blob: 7eacaab6382213e6e6b6063cd9f32a520c95365f [file] [log] [blame]
Derek Allard2067d1a2008-11-13 22:59:24 +00001<?php
Derek Jones0c1e4052010-03-02 14:31:31 -06002
Derek Allard2067d1a2008-11-13 22:59:24 +00003/*
Derek Jones0c1e4052010-03-02 14:31:31 -06004 *---------------------------------------------------------------
joelcoxcee80752011-01-15 23:09:47 +01005 * APPLICATION ENVIRONMENT
6 *---------------------------------------------------------------
7 *
8 * You can load different configurations depending on your
9 * current environment. The enviroment variable can be set
10 * to "development" (default), "test" or "production"
11 *
12 */
13 define('ENVIRONMENT', 'development');
14
15/*
16 *---------------------------------------------------------------
Derek Jones0c1e4052010-03-02 14:31:31 -060017 * PHP ERROR REPORTING LEVEL
18 *---------------------------------------------------------------
19 *
20 * By default CI runs with error reporting set to ALL. For security
Derek Jones79bd0362010-10-06 10:06:37 -050021 * reasons you are encouraged to change this to 0 when your site goes live.
Derek Jones0c1e4052010-03-02 14:31:31 -060022 * For more info visit: http://www.php.net/error_reporting
23 *
24 */
Derek Allard2067d1a2008-11-13 22:59:24 +000025 error_reporting(E_ALL);
26
27/*
Derek Jones0c1e4052010-03-02 14:31:31 -060028 *---------------------------------------------------------------
29 * SYSTEM FOLDER NAME
30 *---------------------------------------------------------------
31 *
32 * This variable must contain the name of your "system" folder.
33 * Include the path if the folder is not in the same directory
34 * as this file.
35 *
36 */
37 $system_path = "system";
Derek Allard2067d1a2008-11-13 22:59:24 +000038
39/*
Derek Jones0c1e4052010-03-02 14:31:31 -060040 *---------------------------------------------------------------
41 * APPLICATION FOLDER NAME
42 *---------------------------------------------------------------
43 *
44 * If you want this front controller to use a different "application"
Barry Mienydd671972010-10-04 16:33:58 +020045 * folder then the default one you can set its name here. The folder
Derek Jones0c1e4052010-03-02 14:31:31 -060046 * can also be renamed or relocated anywhere on your server. If
47 * you do, use a full server path. For more info please see the user guide:
48 * http://codeigniter.com/user_guide/general/managing_apps.html
49 *
50 * NO TRAILING SLASH!
51 *
52 */
Derek Allard2067d1a2008-11-13 22:59:24 +000053 $application_folder = "application";
54
55/*
Derek Jones0c1e4052010-03-02 14:31:31 -060056 * --------------------------------------------------------------------
57 * DEFAULT CONTROLLER
58 * --------------------------------------------------------------------
59 *
60 * Normally you will set your default controller in the routes.php file.
Barry Mienydd671972010-10-04 16:33:58 +020061 * You can, however, force a custom routing by hard-coding a
Derek Jones0c1e4052010-03-02 14:31:31 -060062 * specific controller class/function here. For most applications, you
Barry Mienydd671972010-10-04 16:33:58 +020063 * WILL NOT set your routing here, but it's an option for those
Derek Jones0c1e4052010-03-02 14:31:31 -060064 * special instances where you might want to override the standard
65 * routing in a specific front controller that shares a common CI installation.
66 *
67 * IMPORTANT: If you set the routing here, NO OTHER controller will be
68 * callable. In essence, this preference limits your application to ONE
69 * specific controller. Leave the function name blank if you need
70 * to call functions dynamically via the URI.
71 *
72 * Un-comment the $routing array below to use this feature
73 *
74 */
Barry Mienydd671972010-10-04 16:33:58 +020075 // The directory name, relative to the "controllers" folder. Leave blank
76 // if your controller is not in a sub-folder within the "controllers" folder
Derek Jones0c1e4052010-03-02 14:31:31 -060077 // $routing['directory'] = '';
Barry Mienydd671972010-10-04 16:33:58 +020078
Derek Jones0c1e4052010-03-02 14:31:31 -060079 // The controller class file name. Example: Mycontroller.php
80 // $routing['controller'] = '';
Barry Mienydd671972010-10-04 16:33:58 +020081
82 // The controller function you wish to be called.
Derek Jones0c1e4052010-03-02 14:31:31 -060083 // $routing['function'] = '';
Derek Allard2067d1a2008-11-13 22:59:24 +000084
85
86/*
Derek Jones0c1e4052010-03-02 14:31:31 -060087 * -------------------------------------------------------------------
88 * CUSTOM CONFIG VALUES
89 * -------------------------------------------------------------------
90 *
91 * The $assign_to_config array below will be passed dynamically to the
Barry Mienydd671972010-10-04 16:33:58 +020092 * config class when initialized. This allows you to set custom config
93 * items or override any default config values found in the config.php file.
Derek Jones0c1e4052010-03-02 14:31:31 -060094 * This can be handy as it permits you to share one application between
Barry Mienydd671972010-10-04 16:33:58 +020095 * multiple front controller files, with each file containing different
Derek Jones0c1e4052010-03-02 14:31:31 -060096 * config values.
97 *
98 * Un-comment the $assign_to_config array below to use this feature
99 *
100 */
101 // $assign_to_config['name_of_config_item'] = 'value of config item';
102
103
104
105// --------------------------------------------------------------------
106// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
107// --------------------------------------------------------------------
108
109
110
111
112/*
113 * ---------------------------------------------------------------
114 * Resolve the system path for increased reliability
115 * ---------------------------------------------------------------
116 */
Greg Aker0846d742010-04-08 11:47:33 -0500117 if (realpath($system_path) !== FALSE)
Derek Allard2067d1a2008-11-13 22:59:24 +0000118 {
Derek Jones0c1e4052010-03-02 14:31:31 -0600119 $system_path = realpath($system_path).'/';
Derek Allard2067d1a2008-11-13 22:59:24 +0000120 }
Barry Mienydd671972010-10-04 16:33:58 +0200121
Derek Jones0c1e4052010-03-02 14:31:31 -0600122 // ensure there's a trailing slash
123 $system_path = rtrim($system_path, '/').'/';
Derek Allard2067d1a2008-11-13 22:59:24 +0000124
Derek Joneseba35082010-03-22 10:43:56 -0500125 // Is the system path correct?
Derek Jones0c1e4052010-03-02 14:31:31 -0600126 if ( ! is_dir($system_path))
Derek Allard2067d1a2008-11-13 22:59:24 +0000127 {
Barry Mienydd671972010-10-04 16:33:58 +0200128 exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
Derek Allard2067d1a2008-11-13 22:59:24 +0000129 }
130
Derek Jones0c1e4052010-03-02 14:31:31 -0600131/*
132 * -------------------------------------------------------------------
133 * Now that we know the path, set the main path constants
134 * -------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200135 */
Derek Jones0c1e4052010-03-02 14:31:31 -0600136 // The name of THIS file
137 define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
138
139 // The PHP file extension
140 define('EXT', '.php');
141
Barry Mienydd671972010-10-04 16:33:58 +0200142 // Path to the system folder
Derek Jones0c1e4052010-03-02 14:31:31 -0600143 define('BASEPATH', str_replace("\\", "/", $system_path));
Barry Mienydd671972010-10-04 16:33:58 +0200144
Derek Jones0c1e4052010-03-02 14:31:31 -0600145 // Path to the front controller (this file)
146 define('FCPATH', str_replace(SELF, '', __FILE__));
Barry Mienydd671972010-10-04 16:33:58 +0200147
Derek Jones0c1e4052010-03-02 14:31:31 -0600148 // Name of the "system folder"
Barry Mienydd671972010-10-04 16:33:58 +0200149 define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
Derek Jones0c1e4052010-03-02 14:31:31 -0600150
151
152 // The path to the "application" folder
153 if (is_dir($application_folder))
154 {
155 define('APPPATH', $application_folder.'/');
156 }
157 else
Barry Mienydd671972010-10-04 16:33:58 +0200158 {
Derek Jones0c1e4052010-03-02 14:31:31 -0600159 if ( ! is_dir(BASEPATH.$application_folder.'/'))
160 {
Barry Mienydd671972010-10-04 16:33:58 +0200161 exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
Derek Jones0c1e4052010-03-02 14:31:31 -0600162 }
Barry Mienydd671972010-10-04 16:33:58 +0200163
Derek Jones0c1e4052010-03-02 14:31:31 -0600164 define('APPPATH', BASEPATH.$application_folder.'/');
165 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000166
167/*
Derek Jones0c1e4052010-03-02 14:31:31 -0600168 * --------------------------------------------------------------------
169 * LOAD THE BOOTSTRAP FILE
170 * --------------------------------------------------------------------
171 *
172 * And away we go...
173 *
174 */
175require_once BASEPATH.'core/CodeIgniter'.EXT;
Derek Jones3b890ba2010-02-17 18:13:15 -0600176
Derek Allard2067d1a2008-11-13 22:59:24 +0000177/* End of file index.php */
Derek Jonesa3ffbbb2008-05-11 18:18:29 +0000178/* Location: ./index.php */