These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /* |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
4 | * --------------------------------------------------------------- |
||
5 | * APPLICATION ENVIRONMENT |
||
6 | * --------------------------------------------------------------- |
||
7 | * |
||
8 | * You can load different configurations depending on your |
||
9 | * current environment. Setting the environment also influences |
||
10 | * things like logging and error reporting. |
||
11 | * |
||
12 | * This can be set to anything, but default usage is: |
||
13 | * |
||
14 | * development |
||
15 | * testing |
||
16 | * production |
||
17 | * |
||
18 | * NOTE: If you change these, also change the error_reporting() code below |
||
19 | * |
||
20 | */ |
||
21 | |||
22 | /** |
||
23 | * Hard user rebase, if trying to use index.php |
||
24 | * |
||
25 | * (!strpos($_SERVER['REQUEST_URI'], 'index.php')) OR header("Location:http://" . $_SERVER['SERVER_NAME'] . "/page_not_found"); |
||
0 ignored issues
–
show
|
|||
26 | */ |
||
27 | if (php_sapi_name() !== 'cli' && strpos($_SERVER['REQUEST_URI'], 'index.php') !== false) { |
||
28 | header("Location:http://" . str_replace('/index.php', '', $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'])); |
||
29 | exit; |
||
30 | } |
||
31 | |||
32 | define('ENVIRONMENT', 'production'); |
||
33 | /* |
||
34 | * --------------------------------------------------------------- |
||
35 | * ERROR REPORTING |
||
36 | * --------------------------------------------------------------- |
||
37 | * |
||
38 | * Different environments will require different levels of error reporting. |
||
39 | * By default development will show errors but testing and live will hide them. |
||
40 | */ |
||
41 | switch (ENVIRONMENT) { |
||
42 | case 'development': |
||
43 | error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING); |
||
44 | ini_set('display_errors', 'on'); |
||
45 | break; |
||
46 | |||
47 | case 'testing': |
||
48 | case 'production': |
||
49 | error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT ^ E_WARNING); |
||
50 | ini_set('display_errors', 'off'); |
||
51 | break; |
||
52 | |||
53 | default: |
||
54 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
||
55 | exit('The application environment is not set correctly.'); |
||
56 | } |
||
57 | |||
58 | /* |
||
59 | * --------------------------------------------------------------- |
||
60 | * SYSTEM FOLDER NAME |
||
61 | * --------------------------------------------------------------- |
||
62 | * |
||
63 | * This variable must contain the name of your "system" folder. |
||
64 | * Include the path if the folder is not in the same directory |
||
65 | * as this file. |
||
66 | * |
||
67 | */ |
||
68 | $system_path = 'system'; |
||
69 | |||
70 | /* |
||
71 | * --------------------------------------------------------------- |
||
72 | * APPLICATION FOLDER NAME |
||
73 | * --------------------------------------------------------------- |
||
74 | * |
||
75 | * If you want this front controller to use a different "application" |
||
76 | * folder then the default one you can set its name here. The folder |
||
77 | * can also be renamed or relocated anywhere on your server. If |
||
78 | * you do, use a full server path. For more info please see the user guide: |
||
79 | * http://codeigniter.com/user_guide/general/managing_apps.html |
||
80 | * |
||
81 | * NO TRAILING SLASH! |
||
82 | * |
||
83 | */ |
||
84 | $application_folder = 'application'; |
||
85 | |||
86 | /* |
||
87 | * -------------------------------------------------------------------- |
||
88 | * DEFAULT CONTROLLER |
||
89 | * -------------------------------------------------------------------- |
||
90 | * |
||
91 | * Normally you will set your default controller in the routes.php file. |
||
92 | * You can, however, force a custom routing by hard-coding a |
||
93 | * specific controller class/function here. For most applications, you |
||
94 | * WILL NOT set your routing here, but it's an option for those |
||
95 | * special instances where you might want to override the standard |
||
96 | * routing in a specific front controller that shares a common CI installation. |
||
97 | * |
||
98 | * IMPORTANT: If you set the routing here, NO OTHER controller will be |
||
99 | * callable. In essence, this preference limits your application to ONE |
||
100 | * specific controller. Leave the function name blank if you need |
||
101 | * to call functions dynamically via the URI. |
||
102 | * |
||
103 | * Un-comment the $routing array below to use this feature |
||
104 | * |
||
105 | */ |
||
106 | // The directory name, relative to the "controllers" folder. Leave blank |
||
107 | // if your controller is not in a sub-folder within the "controllers" folder |
||
108 | // $routing['directory'] = ''; |
||
109 | // The controller class file name. Example: Mycontroller |
||
110 | // $routing['controller'] = ''; |
||
111 | // The controller function you wish to be called. |
||
112 | // $routing['function'] = ''; |
||
113 | |||
114 | |||
115 | /* |
||
116 | * ------------------------------------------------------------------- |
||
117 | * CUSTOM CONFIG VALUES |
||
118 | * ------------------------------------------------------------------- |
||
119 | * |
||
120 | * The $assign_to_config array below will be passed dynamically to the |
||
121 | * config class when initialized. This allows you to set custom config |
||
122 | * items or override any default config values found in the config.php file. |
||
123 | * This can be handy as it permits you to share one application between |
||
124 | * multiple front controller files, with each file containing different |
||
125 | * config values. |
||
126 | * |
||
127 | * Un-comment the $assign_to_config array below to use this feature |
||
128 | * |
||
129 | */ |
||
130 | // $assign_to_config['name_of_config_item'] = 'value of config item'; |
||
131 | // -------------------------------------------------------------------- |
||
132 | // END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE |
||
133 | // -------------------------------------------------------------------- |
||
134 | |||
135 | /* |
||
136 | * --------------------------------------------------------------- |
||
137 | * Resolve the system path for increased reliability |
||
138 | * --------------------------------------------------------------- |
||
139 | */ |
||
140 | |||
141 | // Set the current directory correctly for CLI requests |
||
142 | |||
143 | if (defined('STDIN')) { |
||
144 | chdir(__DIR__); |
||
145 | } |
||
146 | |||
147 | if (realpath($system_path) !== FALSE) { |
||
148 | $system_path = realpath($system_path) . '/'; |
||
149 | } |
||
150 | |||
151 | // ensure there's a trailing slash |
||
152 | $system_path = rtrim($system_path, '/') . '/'; |
||
153 | |||
154 | // Is the system path correct? |
||
155 | if (!is_dir($system_path)) { |
||
156 | exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: " . pathinfo(__FILE__, PATHINFO_BASENAME)); |
||
157 | } |
||
158 | |||
159 | /* |
||
160 | * ------------------------------------------------------------------- |
||
161 | * Now that we know the path, set the main path constants |
||
162 | * ------------------------------------------------------------------- |
||
163 | */ |
||
164 | // The name of THIS file |
||
165 | define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); |
||
166 | |||
167 | // The PHP file extension |
||
168 | // this global constant is deprecated. |
||
169 | define('EXT', '.php'); |
||
170 | |||
171 | // this global constant is deprecated. |
||
172 | define('DS', '/'); |
||
173 | |||
174 | // Path to the system folder |
||
175 | define('BASEPATH', str_replace("\\", "/", $system_path)); |
||
176 | |||
177 | // Path to the front controller (this file) |
||
178 | define('FCPATH', str_replace(SELF, '', __FILE__)); |
||
179 | |||
180 | define('PUBPATH', FCPATH); |
||
181 | define('TEMPLATES_PATH', PUBPATH . 'templates/'); |
||
182 | |||
183 | // Uploads directory path |
||
184 | define('UPLOADSPATH', PUBPATH . 'uploads/'); |
||
185 | |||
186 | // Name of the "system folder" |
||
187 | define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); |
||
188 | |||
189 | define('DOCUMENT_ROOT', $_SERVER['DOCUMENT_ROOT']); |
||
190 | define('MAINSITE', ''); |
||
191 | define('BACKUPFOLDER', PUBPATH . 'application/backups/'); |
||
192 | // The path to the "application" folder |
||
193 | if (is_dir($application_folder)) { |
||
194 | define('APPPATH', $application_folder . '/'); |
||
195 | } else { |
||
196 | if (!is_dir(BASEPATH . $application_folder . '/')) { |
||
197 | exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: " . SELF); |
||
198 | } |
||
199 | |||
200 | define('APPPATH', BASEPATH . $application_folder . '/'); |
||
201 | } |
||
202 | |||
203 | define('IMAGECMS_NUMBER', '4.8.1 Corporate'); |
||
204 | |||
205 | define('IMAGECMS_VERSION', '20160720'); |
||
206 | |||
207 | define('IMAGECMS_BUILD_ID', '${buildid}'); |
||
208 | |||
209 | define('BUILD_ID', '4120.10720'); |
||
210 | |||
211 | define('IMAGECMS_PUBLIC_ID', '51035d2a96a227c54d0dea3ff415ced6d39266c3'); |
||
212 | |||
213 | |||
214 | /* |
||
215 | * -------------------------------------------------------------------- |
||
216 | * LOAD THE BOOTSTRAP FILE |
||
217 | * -------------------------------------------------------------------- |
||
218 | * |
||
219 | * And away we go... |
||
220 | * |
||
221 | */ |
||
222 | require_once BASEPATH . 'core/CodeIgniter.php'; |
||
223 | |||
224 | /* End of file index.php */ |
||
225 | /* Location: ./index.php */ |