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
00033 define('APP_DIR', 'app');
00034 define('DS', DIRECTORY_SEPARATOR);
00035 define('ROOT', dirname(__FILE__));
00036 define('WEBROOT_DIR', 'webroot');
00037 define('WWW_ROOT', ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS);
00038
00039
00040
00041
00042 if (!defined('CAKE_CORE_INCLUDE_PATH')) {
00043
00044 define('CAKE_CORE_INCLUDE_PATH', ROOT);
00045 }
00046 if (function_exists('ini_set')) {
00047 ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS);
00048 define('APP_PATH', null);
00049 define('CORE_PATH', null);
00050 } else {
00051 define('APP_PATH', ROOT . DS . APP_DIR . DS);
00052 define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
00053 }
00054 require CORE_PATH . 'cake' . DS . 'basics.php';
00055 require APP_PATH . 'config' . DS . 'core.php';
00056 require CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php';
00057 $bootstrap=true;
00058 $uri =setUri();
00059
00060
00061
00062
00063 if ($uri === '/' || $uri === '/index.php') {
00064 $_GET['url'] = '/';
00065 require APP_DIR . DS . WEBROOT_DIR . DS . 'index.php';
00066 } else {
00067 $elements=explode('/index.php', $uri);
00068
00069 if (!empty($elements[1])) {
00070 $path = $elements[1];
00071 } else {
00072 $path = '/';
00073 }
00074 $_GET['url']=$path;
00075 require APP_DIR . DS . WEBROOT_DIR . DS . 'index.php';
00076 }
00077 ?>