| 1 |
<?php |
| 2 |
/* |
| 3 |
|--------------------------------------------------------------- |
| 4 |
| PHP ERROR REPORTING LEVEL |
| 5 |
|--------------------------------------------------------------- |
| 6 |
| |
| 7 |
| By default CI runs with error reporting set to ALL. For security |
| 8 |
| reasons you are encouraged to change this when your site goes live. |
| 9 |
| For more info visit: http://www.php.net/error_reporting |
| 10 |
| |
| 11 |
*/ |
| 12 |
error_reporting(E_ALL); |
| 13 |
|
| 14 |
/* |
| 15 |
|--------------------------------------------------------------- |
| 16 |
| SYSTEM FOLDER NAME |
| 17 |
|--------------------------------------------------------------- |
| 18 |
| |
| 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 |
| |
| 25 |
*/ |
| 26 |
$system_folder = "system"; |
| 27 |
|
| 28 |
/* |
| 29 |
|--------------------------------------------------------------- |
| 30 |
| APPLICATION FOLDER NAME |
| 31 |
|--------------------------------------------------------------- |
| 32 |
| |
| 33 |
| If you want this front controller to use a different "application" |
| 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: |
| 37 |
| http://codeigniter.com/user_guide/general/managing_apps.html |
| 38 |
| |
| 39 |
| |
| 40 |
| NO TRAILING SLASH! |
| 41 |
| |
| 42 |
*/ |
| 43 |
$application_folder = "application"; |
| 44 |
|
| 45 |
/* |
| 46 |
|=============================================================== |
| 47 |
| END OF USER CONFIGURABLE SETTINGS |
| 48 |
|=============================================================== |
| 49 |
*/ |
| 50 |
|
| 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. |
| 59 |
| Note: We only attempt this if the user hasn't specified a |
| 60 |
| full server path. |
| 61 |
| |
| 62 |
*/ |
| 63 |
if (strpos($system_folder, '/') === FALSE) |
| 64 |
{ |
| 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); |
| 74 |
} |
| 75 |
|
| 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 |
*/ |
| 88 |
define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION)); |
| 89 |
define('FCPATH', __FILE__); |
| 90 |
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); |
| 91 |
define('BASEPATH', $system_folder.'/'); |
| 92 |
|
| 93 |
if (is_dir($application_folder)) |
| 94 |
{ |
| 95 |
define('APPPATH', $application_folder.'/'); |
| 96 |
} |
| 97 |
else |
| 98 |
{ |
| 99 |
if ($application_folder == '') |
| 100 |
{ |
| 101 |
$application_folder = 'application'; |
| 102 |
} |
| 103 |
|
| 104 |
define('APPPATH', BASEPATH.$application_folder.'/'); |
| 105 |
} |
| 106 |
|
| 107 |
/* |
| 108 |
|--------------------------------------------------------------- |
| 109 |
| LOAD THE FRONT CONTROLLER |
| 110 |
|--------------------------------------------------------------- |
| 111 |
| |
| 112 |
| And away we go... |
| 113 |
| |
| 114 |
*/ |
| 115 |
require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; |
| 116 |
|
| 117 |
/* End of file index.php */ |
| 118 |
/* Location: ./index.php */ |