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 | | |
| 8 | | By default CI runs with all error reporting on. For security |
| 9 | | reasons you are encouraged to change this when your site goes live. |
| 10 | | |
| 11 | */ |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 12 | error_reporting(E_ALL); |
| 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. |
| 20 | | Include the path if the folder is not in the same directory |
| 21 | | as this file. |
| 22 | | |
| 23 | | NO TRAILING SLASH! |
| 24 | | |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 25 | */ |
| 26 | |
| 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 | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame^] | 34 | | If you want this front controller to use a different "application" |
| 35 | | folder then the default one you can set its name here. |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 36 | | |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame^] | 37 | | NO TRAILING SLASH! |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 38 | | |
| 39 | */ |
| 40 | |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame^] | 41 | $application_folder = "application"; |
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 | |=============================================================== |
| 45 | | END OF USER CONFIGURABLE SETTINGS |
| 46 | |=============================================================== |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 47 | */ |
| 48 | |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame^] | 49 | // Let's attempt to determine the full-server path to the "system" |
| 50 | // folder in order to reduce the possibility of path problems. |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 51 | if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE) |
| 52 | { |
| 53 | $system_folder = str_replace("\\", "/", realpath(dirname(__FILE__))).'/'.$system_folder; |
| 54 | } |
| 55 | |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame^] | 56 | // Is the aplication variable blank? If so, we'll assume it's called "application" |
| 57 | if ($application_folder == '') |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 58 | { |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame^] | 59 | $application_folder = 'application'; |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 60 | } |
| 61 | |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame^] | 62 | // Some versions of PHP don't support the E_STRICT constant so we'll |
| 63 | // explicitly define it so that it will be available to the Exception class |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 64 | if ( ! defined('E_STRICT')) |
| 65 | { |
| 66 | define('E_STRICT', 2048); |
| 67 | } |
| 68 | |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame^] | 69 | // Define a few constants that we use througout the framework. |
| 70 | // EXT - contains the file extension. Typically ".php" |
| 71 | // FCPATH - contains the full server path to THIS file. |
| 72 | // SELF - contains the name of THIS file. |
| 73 | // BASEPATH - contains the full server path to the "system" folder |
| 74 | // APPPATH - contains the full server path to the "application" folder |
| 75 | |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 76 | define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION)); |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame^] | 77 | define('FCPATH', __FILE__); |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 78 | define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); |
| 79 | define('BASEPATH', $system_folder.'/'); |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame^] | 80 | define('APPPATH', BASEPATH.$application_folder.'/'); |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 81 | |
admin | 1af5549 | 2006-09-22 21:43:38 +0000 | [diff] [blame^] | 82 | // Load the front controller and away we go!.... |
admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 83 | require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; |
| 84 | ?> |