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