admin | b0dd10f | 2006-08-25 17:25:49 +0000 | [diff] [blame] | 1 | <?php |
| 2 | |
| 3 | error_reporting(E_ALL); |
| 4 | |
| 5 | /* |
| 6 | |------------------------------------------------ |
| 7 | | SYSTEM FOLDER NAME |
| 8 | |------------------------------------------------ |
| 9 | | |
| 10 | | This variable must contain the name of your "system" |
| 11 | | folder. Include the path if the folder is not in the same |
| 12 | | directory as this file. No trailing slash |
| 13 | */ |
| 14 | |
| 15 | $system_folder = "system"; |
| 16 | |
| 17 | /* |
| 18 | |------------------------------------------------ |
| 19 | | APPLICATION FOLDER NAME |
| 20 | |------------------------------------------------ |
| 21 | | |
| 22 | | If you want this front controller to use a specific |
| 23 | | "application" folder you can set its name here. |
| 24 | | By doing so you can have multiple applications share |
| 25 | | a common set of Code Igniter system files. |
| 26 | | Note: It is assumed that your application folder will |
| 27 | | be located within the main system/application folder. |
| 28 | | For example, lets say you have two applications, |
| 29 | | "foo" and "bar": |
| 30 | | |
| 31 | | system/application/foo/ |
| 32 | | system/application/foo/config/ |
| 33 | | system/application/foo/controllers/ |
| 34 | | system/application/foo/errors/ |
| 35 | | system/application/foo/scripts/ |
| 36 | | system/application/foo/views/ |
| 37 | | system/application/bar/ |
| 38 | | system/application/bar/config/ |
| 39 | | system/application/bar/controllers/ |
| 40 | | system/application/bar/errors/ |
| 41 | | system/application/bar/scripts/ |
| 42 | | system/application/bar/views/ |
| 43 | | |
| 44 | | If you would like to use the "foo" application you'll |
| 45 | | set the variable like this: |
| 46 | | |
| 47 | | $application_folder = "foo"; |
| 48 | | |
| 49 | */ |
| 50 | |
| 51 | $application_folder = ""; |
| 52 | |
| 53 | /* |
| 54 | |================================================ |
| 55 | | END OF USER CONFIGURABLE SETTINGS |
| 56 | |================================================ |
| 57 | */ |
| 58 | |
| 59 | if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE) |
| 60 | { |
| 61 | $system_folder = str_replace("\\", "/", realpath(dirname(__FILE__))).'/'.$system_folder; |
| 62 | } |
| 63 | |
| 64 | if ($application_folder != '') |
| 65 | { |
| 66 | $application_folder .= '/'; |
| 67 | } |
| 68 | |
| 69 | // Older versions of PHP don't support this so we'll explicitly define it |
| 70 | if ( ! defined('E_STRICT')) |
| 71 | { |
| 72 | define('E_STRICT', 2048); |
| 73 | } |
| 74 | |
| 75 | define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION)); |
| 76 | define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); |
| 77 | define('BASEPATH', $system_folder.'/'); |
| 78 | define('APPPATH', BASEPATH.'application/'.$application_folder); |
| 79 | |
| 80 | require_once BASEPATH.'codeigniter/CodeIgniter'.EXT; |
| 81 | ?> |