admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 1 | <?php |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame] | 2 | /* |
| 3 | |--------------------------------------------------------------- |
| 4 | | PHP ERROR REPORTING LEVEL |
| 5 | |--------------------------------------------------------------- |
| 6 | | |
admin | 8f0a8f6 | 2006-10-07 01:17:25 +0000 | [diff] [blame] | 7 | | By default CI runs with error reporting set to ALL. For security |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame] | 8 | | reasons you are encouraged to change this when your site goes live. |
admin | 784add7 | 2006-10-30 20:24:26 +0000 | [diff] [blame] | 9 | | For more info visit: http://www.php.net/error_reporting |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame] | 10 | | |
| 11 | */ |
admin | 784add7 | 2006-10-30 20:24:26 +0000 | [diff] [blame] | 12 | error_reporting(E_ALL); |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 13 | |
| 14 | /* |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame] | 15 | |--------------------------------------------------------------- |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 16 | | SYSTEM FOLDER NAME |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame] | 17 | |--------------------------------------------------------------- |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 18 | | |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame] | 19 | | This variable must contain the name of your "system" folder. |
admin | e334c47 | 2006-10-21 19:44:22 +0000 | [diff] [blame] | 20 | | Include the path if the folder is not in the same directory |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame] | 21 | | as this file. |
| 22 | | |
| 23 | | NO TRAILING SLASH! |
| 24 | | |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 25 | */ |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 26 | $system_folder = "system"; |
| 27 | |
| 28 | /* |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame] | 29 | |--------------------------------------------------------------- |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 30 | | APPLICATION FOLDER NAME |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame] | 31 | |--------------------------------------------------------------- |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 32 | | |
admin | e334c47 | 2006-10-21 19:44:22 +0000 | [diff] [blame] | 33 | | If you want this front controller to use a different "application" |
admin | 784add7 | 2006-10-30 20:24:26 +0000 | [diff] [blame] | 34 | | folder then the default one you can set its name here. The folder |
| 35 | | can also be renamed or relocated anywhere on your server. |
| 36 | | For more info please see the user guide: |
Derek Jones | 7a9193a | 2008-01-21 18:39:20 +0000 | [diff] [blame] | 37 | | http://codeigniter.com/user_guide/general/managing_apps.html |
admin | cef2106 | 2006-10-30 17:13:13 +0000 | [diff] [blame] | 38 | | |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 39 | | |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame] | 40 | | NO TRAILING SLASH! |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 41 | | |
| 42 | */ |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame] | 43 | $application_folder = "application"; |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 44 | |
Rick Ellis | 268c26c | 2007-07-22 18:14:41 +0000 | [diff] [blame] | 45 | /* |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame] | 46 | |=============================================================== |
admin | 784add7 | 2006-10-30 20:24:26 +0000 | [diff] [blame] | 47 | | END OF USER CONFIGURABLE SETTINGS |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame] | 48 | |=============================================================== |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 49 | */ |
| 50 | |
admin | 784add7 | 2006-10-30 20:24:26 +0000 | [diff] [blame] | 51 | |
| 52 | /* |
| 53 | |--------------------------------------------------------------- |
| 54 | | SET THE SERVER PATH |
| 55 | |--------------------------------------------------------------- |
| 56 | | |
| 57 | | Let's attempt to determine the full-server path to the "system" |
| 58 | | folder in order to reduce the possibility of path problems. |
Rick Ellis | 09066a4 | 2007-06-09 01:00:06 +0000 | [diff] [blame] | 59 | | Note: We only attempt this if the user hasn't specified a |
| 60 | | full server path. |
admin | 784add7 | 2006-10-30 20:24:26 +0000 | [diff] [blame] | 61 | | |
| 62 | */ |
Rick Ellis | 09066a4 | 2007-06-09 01:00:06 +0000 | [diff] [blame] | 63 | if (strpos($system_folder, '/') === FALSE) |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 64 | { |
Rick Ellis | 09066a4 | 2007-06-09 01:00:06 +0000 | [diff] [blame] | 65 | if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE) |
| 66 | { |
| 67 | $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder; |
| 68 | } |
| 69 | } |
| 70 | else |
| 71 | { |
| 72 | // Swap directory separators to Unix style for consistency |
| 73 | $system_folder = str_replace("\\", "/", $system_folder); |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 74 | } |
| 75 | |
admin | 784add7 | 2006-10-30 20:24:26 +0000 | [diff] [blame] | 76 | /* |
| 77 | |--------------------------------------------------------------- |
| 78 | | DEFINE APPLICATION CONSTANTS |
| 79 | |--------------------------------------------------------------- |
| 80 | | |
| 81 | | EXT - The file extension. Typically ".php" |
| 82 | | FCPATH - The full server path to THIS file |
| 83 | | SELF - The name of THIS file (typically "index.php) |
| 84 | | BASEPATH - The full server path to the "system" folder |
| 85 | | APPPATH - The full server path to the "application" folder |
| 86 | | |
| 87 | */ |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 88 | define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION)); |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame] | 89 | define('FCPATH', __FILE__); |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 90 | define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); |
| 91 | define('BASEPATH', $system_folder.'/'); |
admin | cef2106 | 2006-10-30 17:13:13 +0000 | [diff] [blame] | 92 | |
admin | 784add7 | 2006-10-30 20:24:26 +0000 | [diff] [blame] | 93 | if (is_dir($application_folder)) |
admin | cef2106 | 2006-10-30 17:13:13 +0000 | [diff] [blame] | 94 | { |
admin | 784add7 | 2006-10-30 20:24:26 +0000 | [diff] [blame] | 95 | define('APPPATH', $application_folder.'/'); |
admin | cef2106 | 2006-10-30 17:13:13 +0000 | [diff] [blame] | 96 | } |
| 97 | else |
| 98 | { |
admin | 784add7 | 2006-10-30 20:24:26 +0000 | [diff] [blame] | 99 | if ($application_folder == '') |
| 100 | { |
| 101 | $application_folder = 'application'; |
| 102 | } |
| 103 | |
admin | cef2106 | 2006-10-30 17:13:13 +0000 | [diff] [blame] | 104 | define('APPPATH', BASEPATH.$application_folder.'/'); |
| 105 | } |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 106 | |
admin | 784add7 | 2006-10-30 20:24:26 +0000 | [diff] [blame] | 107 | /* |
| 108 | |--------------------------------------------------------------- |
admin | 784add7 | 2006-10-30 20:24:26 +0000 | [diff] [blame] | 109 | | LOAD THE FRONT CONTROLLER |
| 110 | |--------------------------------------------------------------- |
| 111 | | |
| 112 | | And away we go... |
| 113 | | |
| 114 | */ |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 115 | require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; |
Derek Jones | a3ffbbb | 2008-05-11 18:18:29 +0000 | [diff] [blame^] | 116 | |
| 117 | /* End of file index.php */ |
| 118 | /* Location: ./index.php */ |