blob: 47f1ae9eedeff53468c2ff63b56937fa3f85c433 [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 *---------------------------------------------------------------
5 * PHP ERROR REPORTING LEVEL
6 *---------------------------------------------------------------
7 *
8 * By default CI runs with error reporting set to ALL. For security
9 * reasons you are encouraged to change this when your site goes live.
10 * For more info visit: http://www.php.net/error_reporting
11 *
12 */
Derek Allard2067d1a2008-11-13 22:59:24 +000013 error_reporting(E_ALL);
14
15/*
Derek Jones0c1e4052010-03-02 14:31:31 -060016 *---------------------------------------------------------------
17 * SYSTEM FOLDER NAME
18 *---------------------------------------------------------------
19 *
20 * This variable must contain the name of your "system" folder.
21 * Include the path if the folder is not in the same directory
22 * as this file.
23 *
24 */
25 $system_path = "system";
Derek Allard2067d1a2008-11-13 22:59:24 +000026
27/*
Derek Jones0c1e4052010-03-02 14:31:31 -060028 *---------------------------------------------------------------
29 * APPLICATION FOLDER NAME
30 *---------------------------------------------------------------
31 *
32 * If you want this front controller to use a different "application"
33 * folder then the default one you can set its name here. The folder
34 * can also be renamed or relocated anywhere on your server. If
35 * you do, use a full server path. For more info please see the user guide:
36 * http://codeigniter.com/user_guide/general/managing_apps.html
37 *
38 * NO TRAILING SLASH!
39 *
40 */
Derek Allard2067d1a2008-11-13 22:59:24 +000041 $application_folder = "application";
42
43/*
Derek Jones0c1e4052010-03-02 14:31:31 -060044 * --------------------------------------------------------------------
45 * DEFAULT CONTROLLER
46 * --------------------------------------------------------------------
47 *
48 * Normally you will set your default controller in the routes.php file.
49 * You can, however, force a custom routing by hard-coding a
50 * specific controller class/function here. For most applications, you
51 * WILL NOT set your routing here, but it's an option for those
52 * special instances where you might want to override the standard
53 * routing in a specific front controller that shares a common CI installation.
54 *
55 * IMPORTANT: If you set the routing here, NO OTHER controller will be
56 * callable. In essence, this preference limits your application to ONE
57 * specific controller. Leave the function name blank if you need
58 * to call functions dynamically via the URI.
59 *
60 * Un-comment the $routing array below to use this feature
61 *
62 */
63 // The directory name, relative to the "controllers" folder. Leave blank
64 // if your controller is not in a sub-folder within the "controllers" folder
65 // $routing['directory'] = '';
66
67 // The controller class file name. Example: Mycontroller.php
68 // $routing['controller'] = '';
69
70 // The controller function you wish to be called.
71 // $routing['function'] = '';
Derek Allard2067d1a2008-11-13 22:59:24 +000072
73
74/*
Derek Jones0c1e4052010-03-02 14:31:31 -060075 * -------------------------------------------------------------------
76 * CUSTOM CONFIG VALUES
77 * -------------------------------------------------------------------
78 *
79 * The $assign_to_config array below will be passed dynamically to the
80 * config class when initialized. This allows you to set custom config
81 * items or override any default config values found in the config.php file.
82 * This can be handy as it permits you to share one application between
83 * multiple front controller files, with each file containing different
84 * config values.
85 *
86 * Un-comment the $assign_to_config array below to use this feature
87 *
88 */
89 // $assign_to_config['name_of_config_item'] = 'value of config item';
90
91
92
93// --------------------------------------------------------------------
94// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
95// --------------------------------------------------------------------
96
97
98
99
100/*
101 * ---------------------------------------------------------------
102 * Resolve the system path for increased reliability
103 * ---------------------------------------------------------------
104 */
105 if (function_exists('realpath') AND @realpath($system_path) !== FALSE)
Derek Allard2067d1a2008-11-13 22:59:24 +0000106 {
Derek Jones0c1e4052010-03-02 14:31:31 -0600107 $system_path = realpath($system_path).'/';
Derek Allard2067d1a2008-11-13 22:59:24 +0000108 }
Derek Jones0c1e4052010-03-02 14:31:31 -0600109
110 // ensure there's a trailing slash
111 $system_path = rtrim($system_path, '/').'/';
Derek Allard2067d1a2008-11-13 22:59:24 +0000112
Derek Joneseba35082010-03-22 10:43:56 -0500113 // Is the system path correct?
Derek Jones0c1e4052010-03-02 14:31:31 -0600114 if ( ! is_dir($system_path))
Derek Allard2067d1a2008-11-13 22:59:24 +0000115 {
Phil Sturgeon75887a62010-03-12 00:27:51 +0000116 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 +0000117 }
118
Derek Jones0c1e4052010-03-02 14:31:31 -0600119/*
120 * -------------------------------------------------------------------
121 * Now that we know the path, set the main path constants
122 * -------------------------------------------------------------------
123 */
124 // The name of THIS file
125 define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
126
127 // The PHP file extension
128 define('EXT', '.php');
129
130 // Path to the system folder
131 define('BASEPATH', str_replace("\\", "/", $system_path));
132
133 // Path to the front controller (this file)
134 define('FCPATH', str_replace(SELF, '', __FILE__));
135
136 // Name of the "system folder"
137 define('SYSDIR', end(explode('/', trim(BASEPATH, '/'))));
138
139
140 // The path to the "application" folder
141 if (is_dir($application_folder))
142 {
143 define('APPPATH', $application_folder.'/');
144 }
145 else
146 {
147 if ( ! is_dir(BASEPATH.$application_folder.'/'))
148 {
149 exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
150 }
151
152 define('APPPATH', BASEPATH.$application_folder.'/');
153 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000154
155/*
Derek Jones0c1e4052010-03-02 14:31:31 -0600156 * --------------------------------------------------------------------
157 * LOAD THE BOOTSTRAP FILE
158 * --------------------------------------------------------------------
159 *
160 * And away we go...
161 *
162 */
163require_once BASEPATH.'core/CodeIgniter'.EXT;
Derek Jones3b890ba2010-02-17 18:13:15 -0600164
Derek Allard2067d1a2008-11-13 22:59:24 +0000165/* End of file index.php */
Derek Jonesa3ffbbb2008-05-11 18:18:29 +0000166/* Location: ./index.php */