Subversion-Projekte lars-tiefland.cakephp

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/* SVN FILE: $Id: index.php 7945 2008-12-19 02:16:01Z gwoo $ */
3
/**
4
 * Short description for file.
5
 *
6
 * Long description for file
7
 *
8
 * PHP versions 4 and 5
9
 *
10
 * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
11
 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
12
 *
13
 * Licensed under The MIT License
14
 * Redistributions of files must retain the above copyright notice.
15
 *
16
 * @filesource
17
 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
18
 * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
19
 * @package       cake
20
 * @subpackage    cake.app.webroot
21
 * @since         CakePHP(tm) v 0.2.9
22
 * @version       $Revision: 7945 $
23
 * @modifiedby    $LastChangedBy: gwoo $
24
 * @lastmodified  $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 2008) $
25
 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
26
 */
27
/**
28
 * Use the DS to separate the directories in other defines
29
 */
30
	if (!defined('DS')) {
31
		define('DS', DIRECTORY_SEPARATOR);
32
	}
33
/**
34
 * These defines should only be edited if you have cake installed in
35
 * a directory layout other than the way it is distributed.
36
 * When using custom settings be sure to use the DS and do not add a trailing DS.
37
 */
38
 
39
/**
40
 * The full path to the directory which holds "app", WITHOUT a trailing DS.
41
 *
42
 */
43
	if (!defined('ROOT')) {
44
		define('ROOT', dirname(dirname(dirname(__FILE__))));
45
	}
46
/**
47
 * The actual directory name for the "app".
48
 *
49
 */
50
	if (!defined('APP_DIR')) {
51
		define('APP_DIR', basename(dirname(dirname(__FILE__))));
52
	}
53
/**
54
 * The absolute path to the "cake" directory, WITHOUT a trailing DS.
55
 *
56
 */
57
	if (!defined('CAKE_CORE_INCLUDE_PATH')) {
58
		define('CAKE_CORE_INCLUDE_PATH', ROOT);
59
	}
60
 
61
/**
62
 * Editing below this line should NOT be necessary.
63
 * Change at your own risk.
64
 *
65
 */
66
	if (!defined('WEBROOT_DIR')) {
67
		define('WEBROOT_DIR', basename(dirname(__FILE__)));
68
	}
69
	if (!defined('WWW_ROOT')) {
70
		define('WWW_ROOT', dirname(__FILE__) . DS);
71
	}
72
	if (!defined('CORE_PATH')) {
73
		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'))) {
74
			define('APP_PATH', null);
75
			define('CORE_PATH', null);
76
		} else {
77
			define('APP_PATH', ROOT . DS . APP_DIR . DS);
78
			define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
79
		}
80
	}
81
	if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
82
		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);
83
	}
84
	if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {
85
		return;
86
	} else {
87
		$Dispatcher = new Dispatcher();
88
		$Dispatcher->dispatch($url);
89
	}
90
	if (Configure::read() > 0) {
91
		echo "<!-- " . round(getMicrotime() - $TIME_START, 4) . "s -->";
92
	}
93
?>