index.php

Go to the documentation of this file.
00001 <?php
00002 /* SVN FILE: $Id: index_8php-source.html 580 2008-07-01 14:45:49Z gwoo $ */
00003 /**
00004  * Requests collector.
00005  *
00006  *  This file collects requests if:
00007  *  - no mod_rewrite is avilable or .htaccess files are not supported
00008  *  -/public is not set as a web root.
00009  *
00010  * PHP versions 4 and 5
00011  *
00012  * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/>
00013  * Copyright 2005-2008, Cake Software Foundation, Inc.
00014  *                              1785 E. Sahara Avenue, Suite 490-204
00015  *                              Las Vegas, Nevada 89104
00016  *
00017  * Licensed under The MIT License
00018  * Redistributions of files must retain the above copyright notice.
00019  *
00020  * @filesource
00021  * @copyright       Copyright 2005-2008, Cake Software Foundation, Inc.
00022  * @link                http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
00023  * @package         cake
00024  * @since           CakePHP(tm) v 0.2.9
00025  * @version         $Revision: 580 $
00026  * @modifiedby      $LastChangedBy: gwoo $
00027  * @lastmodified    $Date: 2008-07-01 09:45:49 -0500 (Tue, 01 Jul 2008) $
00028  * @license         http://www.opensource.org/licenses/mit-license.php The MIT License
00029  */
00030 /**
00031  *  Get Cake's root directory
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  * This only needs to be changed if the cake installed libs are located
00040  * outside of the distributed directory structure.
00041  */
00042     if (!defined('CAKE_CORE_INCLUDE_PATH')) {
00043         //define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR';
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     $TIME_START = getMicrotime();
00056     require CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php';
00057     require LIBS . 'object.php';
00058     require LIBS . 'inflector.php';
00059     require LIBS . 'configure.php';
00060 
00061     $bootstrap = true;
00062     $url = null;
00063     require APP_DIR . DS . WEBROOT_DIR . DS . 'index.php';
00064 ?>