index.php

Go to the documentation of this file.
00001 <?php
00002 /* SVN FILE: $Id: index.php 7805 2008-10-30 17:30:26Z AD7six $ */
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. (http://www.cakefoundation.org)
00012  *
00013  * Licensed under The MIT License
00014  * Redistributions of files must retain the above copyright notice.
00015  *
00016  * @filesource
00017  * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
00018  * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
00019  * @package       cake
00020  * @subpackage    cake.app.webroot
00021  * @since         CakePHP(tm) v 0.2.9
00022  * @version       $Revision: 7805 $
00023  * @modifiedby    $LastChangedBy: AD7six $
00024  * @lastmodified  $Date: 2008-10-30 13:30:26 -0400 (Thu, 30 Oct 2008) $
00025  * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
00026  */
00027 /**
00028  * Use the DS to separate the directories in other defines
00029  */
00030     if (!defined('DS')) {
00031         define('DS', DIRECTORY_SEPARATOR);
00032     }
00033 /**
00034  * These defines should only be edited if you have cake installed in
00035  * a directory layout other than the way it is distributed.
00036  * When using custom settings be sure to use the DS and do not add a trailing DS.
00037  */
00038 
00039 /**
00040  * The full path to the directory which holds "app", WITHOUT a trailing DS.
00041  *
00042  */
00043     if (!defined('ROOT')) {
00044         define('ROOT', dirname(dirname(dirname(__FILE__))));
00045     }
00046 /**
00047  * The actual directory name for the "app".
00048  *
00049  */
00050     if (!defined('APP_DIR')) {
00051         define('APP_DIR', basename(dirname(dirname(__FILE__))));
00052     }
00053 /**
00054  * The absolute path to the "cake" directory, WITHOUT a trailing DS.
00055  *
00056  */
00057     if (!defined('CAKE_CORE_INCLUDE_PATH')) {
00058         define('CAKE_CORE_INCLUDE_PATH', ROOT);
00059     }
00060 
00061 /**
00062  * Editing below this line should not be necessary.
00063  * Change at your own risk.
00064  *
00065  */
00066     if (!defined('WEBROOT_DIR')) {
00067         define('WEBROOT_DIR', basename(dirname(__FILE__)));
00068     }
00069     if (!defined('WWW_ROOT')) {
00070         define('WWW_ROOT', dirname(__FILE__) . DS);
00071     }
00072     if (!defined('CORE_PATH')) {
00073         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'))) {
00074             define('APP_PATH', null);
00075             define('CORE_PATH', null);
00076         } else {
00077             define('APP_PATH', ROOT . DS . APP_DIR . DS);
00078             define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
00079         }
00080     }
00081     if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
00082         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);
00083     }
00084     if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {
00085         return;
00086     } else {
00087         $Dispatcher = new Dispatcher();
00088         $Dispatcher->dispatch($url);
00089     }
00090     if (Configure::read() > 0) {
00091         echo "<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->";
00092     }
00093 ?>

Generated on Sun Nov 22 00:30:52 2009 for CakePHP 1.2.x.x (v1.2.4.8284) by doxygen 1.4.7