define('PUBLICPATH', DOCROOT . 'public'); //资源目录 define('MODE', '0'); //开发者模式(0:上线模式,1:开发者模式) // Clean up the configuration vars unset($application, $modules, $system); /** * Define the start time of the application, used for profiling. */ if (!defined('KOHANA_START_TIME')) { define('KOHANA_START_TIME', microtime(TRUE)); } /** * Define the memory usage at the start of the application, used for profiling. */ if (!defined('KOHANA_START_MEMORY')) { define('KOHANA_START_MEMORY', memory_get_usage()); } // Bootstrap the application require APPPATH . 'bootstrap' . EXT; if (PHP_SAPI == 'cli') { class_exists('Minion_Task') or die('Please enable the Minion module for CLI support.'); set_exception_handler(array('Minion_Exception', 'handler')); Minion_Task::factory(Minion_CLI::options())->execute(); } else { /** * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO']. * If no source is specified, the URI will be automatically detected. */ echo Request::factory()->execute()->send_headers(TRUE)->body(); }