index.php
Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 if (!defined('DS')) {
00033 define('DS', DIRECTORY_SEPARATOR);
00034 }
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 if (!defined('ROOT')) {
00046 define('ROOT', dirname(dirname(dirname(__FILE__))));
00047 }
00048
00049
00050
00051
00052 if (!defined('APP_DIR')) {
00053 define('APP_DIR', basename(dirname(dirname(__FILE__))));
00054 }
00055
00056
00057
00058
00059 if (!defined('CAKE_CORE_INCLUDE_PATH')) {
00060 define('CAKE_CORE_INCLUDE_PATH', ROOT);
00061 }
00062
00063
00064
00065
00066
00067
00068 if (!defined('WEBROOT_DIR')) {
00069 define('WEBROOT_DIR', basename(dirname(__FILE__)));
00070 }
00071 if (!defined('WWW_ROOT')) {
00072 define('WWW_ROOT', dirname(__FILE__) . DS);
00073 }
00074 if (!defined('CORE_PATH')) {
00075 if (function_exists('ini_set') && ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'))) {
00076 define('APP_PATH', null);
00077 define('CORE_PATH', null);
00078 } else {
00079 define('APP_PATH', ROOT . DS . APP_DIR . DS);
00080 define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
00081 }
00082 }
00083 if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
00084 trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
00085 }
00086 if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {
00087 return;
00088 } else {
00089 $Dispatcher = new Dispatcher();
00090 $Dispatcher->dispatch($url);
00091 }
00092 if (Configure::read() > 0) {
00093 echo "<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->";
00094 }
00095 ?>