]>
jfr.im git - z_archive/KronOS.git/blob - index.php
5 *---------------------------------------------------------------
6 * APPLICATION ENVIRONMENT
7 *---------------------------------------------------------------
9 * You can load different configurations depending on your
10 * current environment. Setting the environment also influences
11 * things like logging and error reporting.
13 * This can be set to anything, but default usage is:
19 * NOTE: If you change these, also change the error_reporting() code below
22 define ( 'ENVIRONMENT' , 'development' );
24 *---------------------------------------------------------------
26 *---------------------------------------------------------------
28 * Different environments will require different levels of error reporting.
29 * By default development will show errors but testing and live will hide them.
32 if ( defined ( 'ENVIRONMENT' ))
37 ini_set ( "display_errors" , 1 );
38 error_reporting ( E_ALL
);
42 ini_set ( "display_error" , 0 );
51 exit ( 'The application environment is not set correctly.' );
56 *---------------------------------------------------------------
58 *---------------------------------------------------------------
60 * This variable must contain the name of your "system" folder.
61 * Include the path if the folder is not in the same directory
65 $system_path = 'system' ;
68 *---------------------------------------------------------------
69 * APPLICATION FOLDER NAME
70 *---------------------------------------------------------------
72 * If you want this front controller to use a different "application"
73 * folder then the default one you can set its name here. The folder
74 * can also be renamed or relocated anywhere on your server. If
75 * you do, use a full server path. For more info please see the user guide:
76 * http://codeigniter.com/user_guide/general/managing_apps.html
81 $application_folder = 'application' ;
84 * --------------------------------------------------------------------
86 * --------------------------------------------------------------------
88 * Normally you will set your default controller in the routes.php file.
89 * You can, however, force a custom routing by hard-coding a
90 * specific controller class/function here. For most applications, you
91 * WILL NOT set your routing here, but it's an option for those
92 * special instances where you might want to override the standard
93 * routing in a specific front controller that shares a common CI installation.
95 * IMPORTANT: If you set the routing here, NO OTHER controller will be
96 * callable. In essence, this preference limits your application to ONE
97 * specific controller. Leave the function name blank if you need
98 * to call functions dynamically via the URI.
100 * Un-comment the $routing array below to use this feature
103 // The directory name, relative to the "controllers" folder. Leave blank
104 // if your controller is not in a sub-folder within the "controllers" folder
105 // $routing['directory'] = '';
107 // The controller class file name. Example: Mycontroller
108 // $routing['controller'] = '';
110 // The controller function you wish to be called.
111 // $routing['function'] = '';
115 * -------------------------------------------------------------------
116 * CUSTOM CONFIG VALUES
117 * -------------------------------------------------------------------
119 * The $assign_to_config array below will be passed dynamically to the
120 * config class when initialized. This allows you to set custom config
121 * items or override any default config values found in the config.php file.
122 * This can be handy as it permits you to share one application between
123 * multiple front controller files, with each file containing different
126 * Un-comment the $assign_to_config array below to use this feature
129 // $assign_to_config['name_of_config_item'] = 'value of config item';
133 // --------------------------------------------------------------------
134 // END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
135 // --------------------------------------------------------------------
138 * ---------------------------------------------------------------
139 * Resolve the system path for increased reliability
140 * ---------------------------------------------------------------
143 // Set the current directory correctly for CLI requests
144 if ( defined ( 'STDIN' ))
146 chdir ( dirname ( __FILE__
));
149 if ( realpath ( $system_path ) !== FALSE )
151 $system_path = realpath ( $system_path ). '/' ;
154 // ensure there's a trailing slash
155 $system_path = rtrim ( $system_path , '/' ). '/' ;
157 // Is the system path correct?
158 if ( ! is_dir ( $system_path ))
160 exit ( "Your system folder path does not appear to be set correctly. Please open the following file and correct this: " . pathinfo ( __FILE__
, PATHINFO_BASENAME
));
164 * -------------------------------------------------------------------
165 * Now that we know the path, set the main path constants
166 * -------------------------------------------------------------------
168 // The name of THIS file
169 define ( 'SELF' , pathinfo ( __FILE__
, PATHINFO_BASENAME
));
171 // The PHP file extension
172 // this global constant is deprecated.
173 define ( 'EXT' , '.php' );
175 // Path to the system folder
176 define ( 'BASEPATH' , str_replace ( " \\ " , "/" , $system_path ));
178 // Path to the front controller (this file)
179 define ( 'FCPATH' , str_replace ( SELF
, '' , __FILE__
));
181 // Name of the "system folder"
182 define ( 'SYSDIR' , trim ( strrchr ( trim ( BASEPATH
, '/' ), '/' ), '/' ));
185 // The path to the "application" folder
186 if ( is_dir ( $application_folder ))
188 define ( 'APPPATH' , $application_folder . '/' );
192 if ( ! is_dir ( BASEPATH
. $application_folder . '/' ))
194 exit ( "Your application folder path does not appear to be set correctly. Please open the following file and correct this: " . SELF
);
197 define ( 'APPPATH' , BASEPATH
. $application_folder . '/' );
201 * --------------------------------------------------------------------
202 * LOAD THE BOOTSTRAP FILE
203 * --------------------------------------------------------------------
208 require_once BASEPATH
. 'core/CodeIgniter.php' ;
210 /* End of file index.php */
211 /* Location: ./index.php */