Senthot.php 1.4 KB

1234567891011121314151617181920212223242526272829
  1. <?php
  2. // +--------------------------------------------------------------------------
  3. // | Senthot [ DEVELOPED BY ME ]
  4. // +--------------------------------------------------------------------------
  5. // | Copyright (c) 2005-2013 http://www.senthot.com All rights reserved.
  6. // | License ( http://www.apache.org/licenses/LICENSE-2.0 )
  7. // | Author: ms134n ( [email protected] )
  8. // +--------------------------------------------------------------------------
  9. // Senthot Import documents
  10. //Recording start running time
  11. $GLOBALS['_beginTime'] = microtime(TRUE);
  12. // Record the initial memory use
  13. define('MEMORY_LIMIT_ON',function_exists('memory_get_usage'));
  14. if(MEMORY_LIMIT_ON) $GLOBALS['_startUseMems'] = memory_get_usage();
  15. defined('APP_PATH') or define('APP_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/');
  16. defined('RUNTIME_PATH') or define('RUNTIME_PATH',APP_PATH.'Runtime/');
  17. defined('APP_DEBUG') or define('APP_DEBUG',false); // Whether Debug Mode
  18. $runtime = defined('MODE_NAME')?'~'.strtolower(MODE_NAME).'_runtime.php':'~runtime.php';
  19. defined('RUNTIME_FILE') or define('RUNTIME_FILE',RUNTIME_PATH.$runtime);
  20. if(!APP_DEBUG && is_file(RUNTIME_FILE)) {
  21. // Deployment Mode to run the cache directly load
  22. require RUNTIME_FILE;
  23. }else{
  24. // System directory definition
  25. defined('SEN_PATH') or define('SEN_PATH', dirname(__FILE__).'/');
  26. // Loaded runtime files
  27. require SEN_PATH.'Common/runtime.php';
  28. }