blob: 6ac78221597cccb15e980d86d8d8c5318acecb4a [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"
Barry Mienydd671972010-10-04 16:33:58 +020033 * folder then the default one you can set its name here. The folder
Derek Jones0c1e4052010-03-02 14:31:31 -060034 * 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.
Barry Mienydd671972010-10-04 16:33:58 +020049 * You can, however, force a custom routing by hard-coding a
Derek Jones0c1e4052010-03-02 14:31:31 -060050 * specific controller class/function here. For most applications, you
Barry Mienydd671972010-10-04 16:33:58 +020051 * WILL NOT set your routing here, but it's an option for those
Derek Jones0c1e4052010-03-02 14:31:31 -060052 * 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 */
Barry Mienydd671972010-10-04 16:33:58 +020063 // The directory name, relative to the "controllers" folder. Leave blank
64 // if your controller is not in a sub-folder within the "controllers" folder
Derek Jones0c1e4052010-03-02 14:31:31 -060065 // $routing['directory'] = '';
Barry Mienydd671972010-10-04 16:33:58 +020066
Derek Jones0c1e4052010-03-02 14:31:31 -060067 // The controller class file name. Example: Mycontroller.php
68 // $routing['controller'] = '';
Barry Mienydd671972010-10-04 16:33:58 +020069
70 // The controller function you wish to be called.
Derek Jones0c1e4052010-03-02 14:31:31 -060071 // $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
Barry Mienydd671972010-10-04 16:33:58 +020080 * 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.
Derek Jones0c1e4052010-03-02 14:31:31 -060082 * This can be handy as it permits you to share one application between
Barry Mienydd671972010-10-04 16:33:58 +020083 * multiple front controller files, with each file containing different
Derek Jones0c1e4052010-03-02 14:31:31 -060084 * 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 */
Greg Aker0846d742010-04-08 11:47:33 -0500105 if (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 }
Barry Mienydd671972010-10-04 16:33:58 +0200109
Derek Jones0c1e4052010-03-02 14:31:31 -0600110 // 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 {
Barry Mienydd671972010-10-04 16:33:58 +0200116 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 * -------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200123 */
Derek Jones0c1e4052010-03-02 14:31:31 -0600124 // The name of THIS file
125 define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
126
127 // The PHP file extension
128 define('EXT', '.php');
129
Barry Mienydd671972010-10-04 16:33:58 +0200130 // Path to the system folder
Derek Jones0c1e4052010-03-02 14:31:31 -0600131 define('BASEPATH', str_replace("\\", "/", $system_path));
Barry Mienydd671972010-10-04 16:33:58 +0200132
Derek Jones0c1e4052010-03-02 14:31:31 -0600133 // Path to the front controller (this file)
134 define('FCPATH', str_replace(SELF, '', __FILE__));
Barry Mienydd671972010-10-04 16:33:58 +0200135
Derek Jones0c1e4052010-03-02 14:31:31 -0600136 // Name of the "system folder"
Barry Mienydd671972010-10-04 16:33:58 +0200137 define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
Derek Jones0c1e4052010-03-02 14:31:31 -0600138
139
140 // The path to the "application" folder
141 if (is_dir($application_folder))
142 {
143 define('APPPATH', $application_folder.'/');
144 }
145 else
Barry Mienydd671972010-10-04 16:33:58 +0200146 {
Derek Jones0c1e4052010-03-02 14:31:31 -0600147 if ( ! is_dir(BASEPATH.$application_folder.'/'))
148 {
Barry Mienydd671972010-10-04 16:33:58 +0200149 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 -0600150 }
Barry Mienydd671972010-10-04 16:33:58 +0200151
Derek Jones0c1e4052010-03-02 14:31:31 -0600152 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 */