bootstrap.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 (!isset($bootstrap)) {
00033 require CORE_PATH . 'cake' . DS . 'basics.php';
00034 require APP_PATH . 'config' . DS . 'core.php';
00035 require CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php';
00036 }
00037 $TIME_START = getMicrotime();
00038 require LIBS . 'object.php';
00039 require LIBS . 'session.php';
00040 require LIBS . 'security.php';
00041 require LIBS . 'inflector.php';
00042 require LIBS . 'configure.php';
00043 $paths = Configure::getInstance();
00044
00045
00046
00047 if (empty($uri) && defined('BASE_URL')) {
00048 $uri = setUri();
00049
00050 if ($uri === '/' || $uri === '/index.php' || $uri === '/'.APP_DIR.'/') {
00051 $_GET['url'] = '/';
00052 $url = '/';
00053 } else {
00054 if (strpos($uri, 'index.php') !== false) {
00055 $uri = r('?', '', $uri);
00056 $elements=explode('/index.php', $uri);
00057 } else {
00058 $elements = explode('/?', $uri);
00059 }
00060
00061 if (!empty($elements[1])) {
00062 $_GET['url'] = $elements[1];
00063 $url = $elements[1];
00064 } else {
00065 $_GET['url'] = '/';
00066 $url = '/';
00067 }
00068 }
00069 } else {
00070 if (empty($_GET['url'])) {
00071 $url = null;
00072 } else {
00073 $url = $_GET['url'];
00074 }
00075 }
00076
00077 if (strpos($url, 'ccss/') === 0) {
00078 include WWW_ROOT . DS . 'css.php';
00079 die();
00080 }
00081
00082 Configure::write('debug', DEBUG);
00083
00084 require CAKE . 'dispatcher.php';
00085
00086 if (defined('CACHE_CHECK') && CACHE_CHECK === true) {
00087 if (empty($uri)) {
00088 $uri = setUri();
00089 }
00090 $filename=CACHE . 'views' . DS . convertSlash($uri) . '.php';
00091
00092 if (file_exists($filename)) {
00093 uses(DS . 'controller' . DS . 'component', DS . 'view' . DS . 'view');
00094 $v = null;
00095 $view = new View($v);
00096 $view->renderCache($filename, $TIME_START);
00097 } elseif (file_exists(CACHE . 'views' . DS . convertSlash($uri) . '_index.php')) {
00098 uses(DS . 'controller' . DS . 'component', DS . 'view' . DS . 'view');
00099 $v = null;
00100 $view = new View($v);
00101 $view->renderCache(CACHE . 'views' . DS . convertSlash($uri) . '_index.php', $TIME_START);
00102 }
00103 }
00104 ?>