4
*---------------------------------------------------------------
5
* APPLICATION ENVIRONMENT
6
*---------------------------------------------------------------
8
* You can load different configurations depending on your
9
* current environment. Setting the environment also influences
10
* things like logging and error reporting.
12
* This can be set to anything, but default usage is:
18
* NOTE: If you change these, also change the error_reporting() code below
21
define('ENVIRONMENT', 'development');
23
*---------------------------------------------------------------
25
*---------------------------------------------------------------
27
* Different environments will require different levels of error reporting.
28
* By default development will show errors but testing and live will hide them.
31
if (defined('ENVIRONMENT'))
36
error_reporting(E_ALL);
45
exit('The application environment is not set correctly.');
50
*---------------------------------------------------------------
52
*---------------------------------------------------------------
54
* This variable must contain the name of your "system" folder.
55
* Include the path if the folder is not in the same directory
59
$system_path = 'system';
62
*---------------------------------------------------------------
63
* APPLICATION FOLDER NAME
64
*---------------------------------------------------------------
66
* If you want this front controller to use a different "application"
67
* folder then the default one you can set its name here. The folder
68
* can also be renamed or relocated anywhere on your server. If
69
* you do, use a full server path. For more info please see the user guide:
70
* http://codeigniter.com/user_guide/general/managing_apps.html
75
$application_folder = 'application';
78
* --------------------------------------------------------------------
80
* --------------------------------------------------------------------
82
* Normally you will set your default controller in the routes.php file.
83
* You can, however, force a custom routing by hard-coding a
84
* specific controller class/function here. For most applications, you
85
* WILL NOT set your routing here, but it's an option for those
86
* special instances where you might want to override the standard
87
* routing in a specific front controller that shares a common CI installation.
89
* IMPORTANT: If you set the routing here, NO OTHER controller will be
90
* callable. In essence, this preference limits your application to ONE
91
* specific controller. Leave the function name blank if you need
92
* to call functions dynamically via the URI.
94
* Un-comment the $routing array below to use this feature
97
// The directory name, relative to the "controllers" folder. Leave blank
98
// if your controller is not in a sub-folder within the "controllers" folder
99
// $routing['directory'] = '';
101
// The controller class file name. Example: Mycontroller
102
// $routing['controller'] = '';
104
// The controller function you wish to be called.
105
// $routing['function'] = '';
109
* -------------------------------------------------------------------
110
* CUSTOM CONFIG VALUES
111
* -------------------------------------------------------------------
113
* The $assign_to_config array below will be passed dynamically to the
114
* config class when initialized. This allows you to set custom config
115
* items or override any default config values found in the config.php file.
116
* This can be handy as it permits you to share one application between
117
* multiple front controller files, with each file containing different
120
* Un-comment the $assign_to_config array below to use this feature
123
// $assign_to_config['name_of_config_item'] = 'value of config item';
127
// --------------------------------------------------------------------
128
// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
129
// --------------------------------------------------------------------
132
* ---------------------------------------------------------------
133
* Resolve the system path for increased reliability
134
* ---------------------------------------------------------------
137
// Set the current directory correctly for CLI requests
138
if (defined('STDIN'))
140
chdir(dirname(__FILE__));
143
if (realpath($system_path) !== FALSE)
145
$system_path = realpath($system_path).'/';
148
// ensure there's a trailing slash
149
$system_path = rtrim($system_path, '/').'/';
151
// Is the system path correct?
152
if ( ! is_dir($system_path))
154
exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
158
* -------------------------------------------------------------------
159
* Now that we know the path, set the main path constants
160
* -------------------------------------------------------------------
162
// The name of THIS file
163
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
165
// The PHP file extension
166
// this global constant is deprecated.
167
define('EXT', '.php');
169
// Path to the system folder
170
define('BASEPATH', str_replace("\\", "/", $system_path));
172
// Path to the front controller (this file)
173
define('FCPATH', str_replace(SELF, '', __FILE__));
175
// Name of the "system folder"
176
define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
179
// The path to the "application" folder
180
if (is_dir($application_folder))
182
define('APPPATH', $application_folder.'/');
186
if ( ! is_dir(BASEPATH.$application_folder.'/'))
188
exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
191
define('APPPATH', BASEPATH.$application_folder.'/');
195
* --------------------------------------------------------------------
196
* LOAD THE BOOTSTRAP FILE
197
* --------------------------------------------------------------------
202
require_once BASEPATH.'core/CodeIgniter.php';
204
/* End of file index.php */
205
/* Location: ./index.php */
b'\\ No newline at end of file'