]>
jfr.im git - z_archive/KronOS.git/blob - index.php
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 ini_set ( "display_errors" , 1 );
37 error_reporting ( E_ALL
);
46 exit ( 'The application environment is not set correctly.' );
51 *---------------------------------------------------------------
53 *---------------------------------------------------------------
55 * This variable must contain the name of your "system" folder.
56 * Include the path if the folder is not in the same directory
60 $system_path = 'system' ;
63 *---------------------------------------------------------------
64 * APPLICATION FOLDER NAME
65 *---------------------------------------------------------------
67 * If you want this front controller to use a different "application"
68 * folder then the default one you can set its name here. The folder
69 * can also be renamed or relocated anywhere on your server. If
70 * you do, use a full server path. For more info please see the user guide:
71 * http://codeigniter.com/user_guide/general/managing_apps.html
76 $application_folder = 'application' ;
79 * --------------------------------------------------------------------
81 * --------------------------------------------------------------------
83 * Normally you will set your default controller in the routes.php file.
84 * You can, however, force a custom routing by hard-coding a
85 * specific controller class/function here. For most applications, you
86 * WILL NOT set your routing here, but it's an option for those
87 * special instances where you might want to override the standard
88 * routing in a specific front controller that shares a common CI installation.
90 * IMPORTANT: If you set the routing here, NO OTHER controller will be
91 * callable. In essence, this preference limits your application to ONE
92 * specific controller. Leave the function name blank if you need
93 * to call functions dynamically via the URI.
95 * Un-comment the $routing array below to use this feature
98 // The directory name, relative to the "controllers" folder. Leave blank
99 // if your controller is not in a sub-folder within the "controllers" folder
100 // $routing['directory'] = '';
102 // The controller class file name. Example: Mycontroller
103 // $routing['controller'] = '';
105 // The controller function you wish to be called.
106 // $routing['function'] = '';
110 * -------------------------------------------------------------------
111 * CUSTOM CONFIG VALUES
112 * -------------------------------------------------------------------
114 * The $assign_to_config array below will be passed dynamically to the
115 * config class when initialized. This allows you to set custom config
116 * items or override any default config values found in the config.php file.
117 * This can be handy as it permits you to share one application between
118 * multiple front controller files, with each file containing different
121 * Un-comment the $assign_to_config array below to use this feature
124 // $assign_to_config['name_of_config_item'] = 'value of config item';
128 // --------------------------------------------------------------------
129 // END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
130 // --------------------------------------------------------------------
133 * ---------------------------------------------------------------
134 * Resolve the system path for increased reliability
135 * ---------------------------------------------------------------
138 // Set the current directory correctly for CLI requests
139 if ( defined ( 'STDIN' ))
141 chdir ( dirname ( __FILE__
));
144 if ( realpath ( $system_path ) !== FALSE )
146 $system_path = realpath ( $system_path ). '/' ;
149 // ensure there's a trailing slash
150 $system_path = rtrim ( $system_path , '/' ). '/' ;
152 // Is the system path correct?
153 if ( ! is_dir ( $system_path ))
155 exit ( "Your system folder path does not appear to be set correctly. Please open the following file and correct this: " . pathinfo ( __FILE__
, PATHINFO_BASENAME
));
159 * -------------------------------------------------------------------
160 * Now that we know the path, set the main path constants
161 * -------------------------------------------------------------------
163 // The name of THIS file
164 define ( 'SELF' , pathinfo ( __FILE__
, PATHINFO_BASENAME
));
166 // The PHP file extension
167 // this global constant is deprecated.
168 define ( 'EXT' , '.php' );
170 // Path to the system folder
171 define ( 'BASEPATH' , str_replace ( " \\ " , "/" , $system_path ));
173 // Path to the front controller (this file)
174 define ( 'FCPATH' , str_replace ( SELF
, '' , __FILE__
));
176 // Name of the "system folder"
177 define ( 'SYSDIR' , trim ( strrchr ( trim ( BASEPATH
, '/' ), '/' ), '/' ));
180 // The path to the "application" folder
181 if ( is_dir ( $application_folder ))
183 define ( 'APPPATH' , $application_folder . '/' );
187 if ( ! is_dir ( BASEPATH
. $application_folder . '/' ))
189 exit ( "Your application folder path does not appear to be set correctly. Please open the following file and correct this: " . SELF
);
192 define ( 'APPPATH' , BASEPATH
. $application_folder . '/' );
196 * --------------------------------------------------------------------
197 * LOAD THE BOOTSTRAP FILE
198 * --------------------------------------------------------------------
203 require_once BASEPATH
. 'core/CodeIgniter.php' ;
205 /* End of file index.php */
206 /* Location: ./index.php */