Mercurial > hg > Members > shoshi > webvirt
comparison index.php @ 0:261e66bd5a0c
hg init
author | Shoshi TAMAKI <shoshi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 24 Jul 2011 21:08:31 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:261e66bd5a0c |
---|---|
1 <?php | |
2 /** | |
3 * Requests collector. | |
4 * | |
5 * This file collects requests if: | |
6 * - no mod_rewrite is avilable or .htaccess files are not supported | |
7 * - requires App.baseUrl to be uncommented in app/config/core.php | |
8 * - app/webroot is not set as a document root. | |
9 * | |
10 * PHP versions 4 and 5 | |
11 * | |
12 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | |
13 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) | |
14 * | |
15 * Licensed under The MIT License | |
16 * Redistributions of files must retain the above copyright notice. | |
17 * | |
18 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) | |
19 * @link http://cakephp.org CakePHP(tm) Project | |
20 * @package cake | |
21 * @since CakePHP(tm) v 0.2.9 | |
22 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) | |
23 */ | |
24 /** | |
25 * Get Cake's root directory | |
26 */ | |
27 define('APP_DIR', 'app'); | |
28 define('DS', DIRECTORY_SEPARATOR); | |
29 define('ROOT', dirname(__FILE__)); | |
30 define('WEBROOT_DIR', 'webroot'); | |
31 define('WWW_ROOT', ROOT . DS . APP_DIR . DS . WEBROOT_DIR . DS); | |
32 /** | |
33 * This only needs to be changed if the "cake" directory is located | |
34 * outside of the distributed structure. | |
35 * Full path to the directory containing "cake". Do not add trailing directory separator | |
36 */ | |
37 if (!defined('CAKE_CORE_INCLUDE_PATH')) { | |
38 define('CAKE_CORE_INCLUDE_PATH', ROOT); | |
39 } | |
40 | |
41 /** | |
42 * Set the include path or define app and core path | |
43 */ | |
44 if (function_exists('ini_set')) { | |
45 ini_set('include_path', | |
46 ini_get('include_path') . PATH_SEPARATOR . CAKE_CORE_INCLUDE_PATH | |
47 . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS | |
48 ); | |
49 define('APP_PATH', null); | |
50 define('CORE_PATH', null); | |
51 } else { | |
52 define('APP_PATH', ROOT . DS . APP_DIR . DS); | |
53 define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); | |
54 } | |
55 require APP_DIR . DS . WEBROOT_DIR . DS . 'index.php'; |