index.php
Go to the documentation of this file.00001 <?php 00002 /* SVN FILE: $Id: app_2webroot_2index_8php-source.html 675 2008-12-26 00:27:14Z gwoo $ */ 00003 /** 00004 * Short description for file. 00005 * 00006 * Long description for file 00007 * 00008 * PHP versions 4 and 5 00009 * 00010 * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/> 00011 * Copyright 2005-2008, Cake Software Foundation, Inc. 00012 * 1785 E. Sahara Avenue, Suite 490-204 00013 * Las Vegas, Nevada 89104 00014 * 00015 * Licensed under The MIT License 00016 * Redistributions of files must retain the above copyright notice. 00017 * 00018 * @filesource 00019 * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. 00020 * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project 00021 * @package cake 00022 * @subpackage cake.app.webroot 00023 * @since CakePHP(tm) v 0.2.9 00024 * @version $Revision: 675 $ 00025 * @modifiedby $LastChangedBy: gwoo $ 00026 * @lastmodified $Date: 2008-12-25 16:27:14 -0800 (Thu, 25 Dec 2008) $ 00027 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 00028 */ 00029 /** 00030 * Do not change 00031 */ 00032 if (!defined('DS')) { 00033 define('DS', DIRECTORY_SEPARATOR); 00034 } 00035 /** 00036 * These defines should only be edited if you have cake installed in 00037 * a directory layout other than the way it is distributed. 00038 * Each define has a commented line of code that explains what you would change. 00039 * 00040 */ 00041 if (!defined('ROOT')) { 00042 //define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECTORY IS LOCATED DO NOT ADD A TRAILING DIRECTORY SEPARATOR'; 00043 //You should also use the DS define to seperate your directories 00044 define('ROOT', dirname(dirname(dirname(__FILE__)))); 00045 } 00046 if (!defined('APP_DIR')) { 00047 //define('APP_DIR', 'DIRECTORY NAME OF APPLICATION'; 00048 define('APP_DIR', basename(dirname(dirname(__FILE__)))); 00049 } 00050 /** 00051 * This only needs to be changed if the cake installed libs are located 00052 * outside of the distributed directory structure. 00053 */ 00054 if (!defined('CAKE_CORE_INCLUDE_PATH')) { 00055 //define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR'; 00056 //You should also use the DS define to seperate your directories 00057 define('CAKE_CORE_INCLUDE_PATH', ROOT); 00058 } 00059 /////////////////////////////// 00060 //DO NOT EDIT BELOW THIS LINE// 00061 /////////////////////////////// 00062 if (!defined('WEBROOT_DIR')) { 00063 define('WEBROOT_DIR', basename(dirname(__FILE__))); 00064 } 00065 if (!defined('WWW_ROOT')) { 00066 define('WWW_ROOT', dirname(__FILE__) . DS); 00067 } 00068 if (!defined('CORE_PATH')) { 00069 if (function_exists('ini_set')) { 00070 ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path')); 00071 define('APP_PATH', null); 00072 define('CORE_PATH', null); 00073 } else { 00074 define('APP_PATH', ROOT . DS . APP_DIR . DS); 00075 define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); 00076 } 00077 } 00078 require CORE_PATH . 'cake' . DS . 'bootstrap.php'; 00079 if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') { 00080 } else { 00081 $Dispatcher = new Dispatcher(); 00082 $Dispatcher->dispatch($url); 00083 } 00084 if (Configure::read() > 0) { 00085 echo "<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->"; 00086 } 00087 ?>