create APP/tmp tree if not exists
[qcms.git] / webroot / index.php
blobcaa0acd02c63775a52c8653df72cf97785e18e09
1 <?php
2 /* SVN FILE: $Id: index.php 6314 2008-01-02 21:33:51Z phpnut $ */
3 /**
4 * Short description for file.
6 * Long description for file
8 * PHP versions 4 and 5
10 * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/>
11 * Copyright 2005-2008, Cake Software Foundation, Inc.
12 * 1785 E. Sahara Avenue, Suite 490-204
13 * Las Vegas, Nevada 89104
15 * Licensed under The MIT License
16 * Redistributions of files must retain the above copyright notice.
18 * @filesource
19 * @copyright Copyright 2005-2008, Cake Software Foundation, Inc.
20 * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
21 * @package cake
22 * @subpackage cake.app.webroot
23 * @since CakePHP(tm) v 0.2.9
24 * @version $Revision: 6314 $
25 * @modifiedby $LastChangedBy: phpnut $
26 * @lastmodified $Date: 2008-01-02 19:33:51 -0200 (miƩ, 02 ene 2008) $
27 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
29 /**
30 * Do not change
32 if (!defined('DS')) {
33 define('DS', DIRECTORY_SEPARATOR);
35 /**
36 * These defines should only be edited if you have cake installed in
37 * a directory layout other than the way it is distributed.
38 * Each define has a commented line of code that explains what you would change.
40 if (!defined('ROOT')) {
41 //define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECTORY IS LOCATED. DO NOT ADD A TRAILING DIRECTORY SEPARATOR');
42 //You should also use the DS define to separate your directories
43 define('ROOT', dirname(dirname(dirname(__FILE__))));
45 if (!defined('APP_DIR')) {
46 //define('APP_DIR', 'DIRECTORY NAME OF APPLICATION');
47 define('APP_DIR', basename(dirname(dirname(__FILE__))));
49 /**
50 * This only needs to be changed if the cake installed libs are located
51 * outside of the distributed directory structure.
53 if (!defined('CAKE_CORE_INCLUDE_PATH')) {
54 //define ('CAKE_CORE_INCLUDE_PATH', 'FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED. DO NOT ADD A TRAILING DIRECTORY SEPARATOR');
55 //You should also use the DS define to separate your directories
56 define('CAKE_CORE_INCLUDE_PATH', ROOT);
58 ///////////////////////////////
59 //DO NOT EDIT BELOW THIS LINE//
60 ///////////////////////////////
61 if (!defined('WEBROOT_DIR')) {
62 define('WEBROOT_DIR', basename(dirname(__FILE__)));
64 if (!defined('WWW_ROOT')) {
65 define('WWW_ROOT', dirname(__FILE__) . DS);
67 if (!defined('CORE_PATH')) {
68 if (function_exists('ini_set')) {
69 ini_set('include_path', CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS . PATH_SEPARATOR . ini_get('include_path'));
70 define('APP_PATH', null);
71 define('CORE_PATH', null);
72 } else {
73 define('APP_PATH', ROOT . DS . APP_DIR . DS);
74 define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
78 include(ROOT.DS.APP_DIR.DS . 'config/maketmp.php');
80 if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
81 trigger_error("Can't find CakePHP core. 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);
83 if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {
84 return;
85 } else {
86 $Dispatcher = new Dispatcher();
87 $Dispatcher->dispatch($url);
89 if (Configure::read() > 0) {
90 echo "<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->";