Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
13532 anikendra 1
<?php
2
/**
3
 * Index
4
 *
5
 * The Front Controller for handling every request
6
 *
7
 * @link          http://cakephp.org CakePHP(tm) Project
8
 * @package       app.webroot
9
 * @since         CakePHP(tm) v 0.2.9
10
 */
11
 
12
/**
13
 * Use the DS to separate the directories in other defines
14
 */
15
if (!defined('DS')) {
16
	define('DS', DIRECTORY_SEPARATOR);
17
}
18
 
19
/**
20
 * These defines should only be edited if you have CakePHP installed in
21
 * a directory layout other than the way it is distributed.
22
 * When using custom settings be sure to use the DS and do not add a trailing DS.
23
 */
24
 
25
/**
26
 * The full path to the directory which holds "app", WITHOUT a trailing DS.
27
 *
28
 */
29
if (!defined('ROOT')) {
30
	define('ROOT', dirname(dirname(dirname(__FILE__))));
31
}
32
 
33
/**
34
 * The actual directory name for the "app".
35
 *
36
 */
37
if (!defined('APP_DIR')) {
38
	define('APP_DIR', basename(dirname(dirname(__FILE__))));
39
}
40
 
41
/**
42
 * The absolute path to the "cake" directory, WITHOUT a trailing DS.
43
 *
44
 * Un-comment this line to specify a fixed path to CakePHP.
45
 * This should point at the directory containing `Cake`.
46
 *
47
 * For ease of development CakePHP uses PHP's include_path. If you
48
 * cannot modify your include_path set this value.
49
 *
50
 * Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
51
 *
52
 * The following line differs from its sibling
53
 * /app/webroot/index.php
54
 */
55
//define('CAKE_CORE_INCLUDE_PATH', __CAKE_PATH__);
56
 
57
/**
58
 * Editing below this line should NOT be necessary.
59
 * Change at your own risk.
60
 *
61
 */
62
if (!defined('WEBROOT_DIR')) {
63
	define('WEBROOT_DIR', basename(dirname(__FILE__)));
64
}
65
if (!defined('WWW_ROOT')) {
66
	define('WWW_ROOT', dirname(__FILE__) . DS);
67
}
68
 
69
// for built-in server
70
if (php_sapi_name() === 'cli-server') {
71
	if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) {
72
		return false;
73
	}
74
	$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
75
}
76
 
77
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
78
	if (function_exists('ini_set')) {
79
		ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
80
	}
81
	if (!include 'Cake' . DS . 'bootstrap.php') {
82
		$failed = true;
83
	}
84
} else {
85
	if (!include CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php') {
86
		$failed = true;
87
	}
88
}
89
if (!empty($failed)) {
90
	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);
91
}
92
 
93
App::uses('Dispatcher', 'Routing');
94
 
95
$Dispatcher = new Dispatcher();
96
$Dispatcher->dispatch(
97
	new CakeRequest(),
98
	new CakeResponse()
99
);