-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
198 lines (172 loc) · 6.29 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<?php
/**
* ExpressionEngine - by EllisLab
*
* @package ExpressionEngine
* @author EllisLab Dev Team
* @copyright Copyright (c) 2003 - 2015, EllisLab, Inc.
* @license http://ellislab.com/expressionengine/user-guide/license.html
* @link http://ellislab.com
* @since Version 2.0
*/
/*
* --------------------------------------------------------------------
* System Path
* --------------------------------------------------------------------
*
* The following variable contains the server path to your
* ExpressionEngine "system" folder. By default the folder is named
* "system" but it can be renamed or moved for increased security.
* Indicate the new name and/or path here. The path can be relative
* or it can be a full server path.
*
* http://ellislab.com/expressionengine/user-guide/installation/best_practices.html
*
*/
$system_path = './system';
/*
* --------------------------------------------------------------------
* Multiple Site Manager
* --------------------------------------------------------------------
*
* Uncomment the following variables if you are using the Multiple
* Site Manager: http://ellislab.com/expressionengine/user-guide/cp/sites
*
* Set the Short Name of the site this file will display, the URL of
* this site's admin.php file, and the main URL of the site (without
* index.php)
*
*/
// $assign_to_config['site_name'] = 'domain2_short_name';
// $assign_to_config['cp_url'] = 'http://domain2.com/admin.php';
// $assign_to_config['site_url'] = 'http://domain2.com';
/*
* --------------------------------------------------------------------
* Error Reporting
* --------------------------------------------------------------------
*
* PHP and database errors are normally displayed dynamically based
* on the authorization level of each user accessing your site.
* This variable allows the error reporting system to be overridden,
* which can be useful for low level debugging during site development,
* since errors happening before a user is authenticated will not normally
* be shown. Options:
*
* $debug = 0; Default setting. Errors shown based on authorization level
*
* $debug = 1; All errors shown regardless of authorization
*
* NOTE: Enabling this override can have security implications.
* Enable it only if you have a good reason to.
*
*/
$debug = 1;
/*
* --------------------------------------------------------------------
* CUSTOM CONFIG VALUES
* --------------------------------------------------------------------
*
* The $assign_to_config array below will be passed dynamically to the
* config class. This allows you to set custom config items or override
* any default config values found in the config.php file. This can
* be handy as it permits you to share one application between more then
* one front controller file, with each file containing different
* config values.
*
* Un-comment the $assign_to_config array below to use this feature
*
* NOTE: This feature can be used to run multiple EE "sites" using
* the old style method. Instead of individual variables you'll
* set array indexes corresponding to them.
*
*/
// $assign_to_config['template_group'] = '';
// $assign_to_config['template'] = '';
// $assign_to_config['site_index'] = '';
// $assign_to_config['site_404'] = '';
// $assign_to_config['global_vars'] = array(); // This array must be associative
/*
* --------------------------------------------------------------------
* END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
* --------------------------------------------------------------------
*/
/*
* ---------------------------------------------------------------
* Disable all routing, send everything to the frontend
* ---------------------------------------------------------------
*/
$routing['directory'] = '';
$routing['controller'] = 'ee';
$routing['function'] = 'index';
/*
* --------------------------------------------------------------------
* Mandatory config overrides
* --------------------------------------------------------------------
*/
$assign_to_config['subclass_prefix'] = 'EE_';
/*
* --------------------------------------------------------------------
* Resolve the system path for increased reliability
* --------------------------------------------------------------------
*/
if (realpath($system_path) !== FALSE)
{
$system_path = realpath($system_path).'/';
}
// ensure there's a trailing slash
$system_path = rtrim($system_path, '/').'/';
// Is the sytsem path correct?
if ( ! is_dir($system_path))
{
exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
}
/*
* --------------------------------------------------------------------
* Now that we know the path, set the main constants
* --------------------------------------------------------------------
*/
// The name of THIS file
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
// The PHP file extension
define('EXT', '.php');
// Path to the system folder
define('BASEPATH', str_replace("\\", "/", $system_path.'codeigniter/system/'));
// Path to the "application" folder
define('APPPATH', $system_path.'expressionengine/');
// Path to the front controller (this file)
define('FCPATH', str_replace(SELF, '', __FILE__));
// Name of the "system folder"
define('SYSDIR', trim(strrchr(trim(str_replace("\\", "/", $system_path), '/'), '/'), '/'));
// The $debug value as a constant for global access
define('DEBUG', $debug);
unset($debug);
/*
* --------------------------------------------------------------------
* Set the error reporting level
* --------------------------------------------------------------------
*/
if (DEBUG == 1)
{
error_reporting(E_ALL);
@ini_set('display_errors', 1);
}
else
{
error_reporting(0);
}
/*
*---------------------------------------------------------------
* LOAD THE BOOTSTRAP FILE
*---------------------------------------------------------------
*
* And away we go...
*
*/
if (isset($_GET['set_lang'])) {
setcookie('exp_language',$_GET['set_lang']);
header('Location: ' . @$_SERVER['HTTP_REFERER']);
exit();
}
require_once BASEPATH.'core/CodeIgniter'.EXT;
/* End of file index.php */
/* Location: ./index.php */