root/tags/2.1.1/index.php
| Revision 1631, 2.6 kB (checked in by Shadowhand, 11 months ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | <?php |
| 2 | /** |
| 3 | * This file acts as the "front controller" to your application. You can |
| 4 | * configure your application and system directories here, as well as error |
| 5 | * reporting and error display. |
| 6 | * |
| 7 | * @package Core |
| 8 | * @author Kohana Team |
| 9 | * @copyright (c) 2007 Kohana Team |
| 10 | * @license http://kohanaphp.com/license.html |
| 11 | */ |
| 12 | |
| 13 | /** |
| 14 | * Kohana website application directory. This directory should contain your |
| 15 | * application configuration, controllers, models, views, and other resources. |
| 16 | * |
| 17 | * This path can be absolute or relative to this file. |
| 18 | */ |
| 19 | $kohana_application = 'application'; |
| 20 | |
| 21 | /** |
| 22 | * Kohana package files. This directory should contain the core/ directory, and |
| 23 | * the resources you included in your download of Kohana. |
| 24 | * |
| 25 | * This path can be absolute or relative to this file. |
| 26 | */ |
| 27 | $kohana_system = 'system'; |
| 28 | |
| 29 | /** |
| 30 | * Set the error reporting level. Unless you have a special need, E_ALL is a |
| 31 | * good level for error reporting. |
| 32 | */ |
| 33 | error_reporting(E_ALL & ~E_STRICT); |
| 34 | |
| 35 | /** |
| 36 | * Turning off display_errors will effectively disable Kohana error display |
| 37 | * and logging. You can turn off Kohana errors in application/config/config.php |
| 38 | */ |
| 39 | ini_set('display_errors', TRUE); |
| 40 | |
| 41 | /** |
| 42 | * If you rename all of your .php files to a different extension, set the new |
| 43 | * extension here. This option can left to .php, even if this file is has a |
| 44 | * different extension. |
| 45 | */ |
| 46 | define('EXT', '.php'); |
| 47 | |
| 48 | /** |
| 49 | * Test to make sure that Kohana is running on PHP 5.1.3 or newer. Once you are |
| 50 | * sure that your environment is compatible with Kohana, you can disable this. |
| 51 | */ |
| 52 | version_compare(PHP_VERSION, '5.1.3', '<') and exit('Kohana requires PHP 5.1.3 or newer.'); |
| 53 | |
| 54 | // |
| 55 | // DO NOT EDIT BELOW THIS LINE, UNLESS YOU FULLY UNDERSTAND THE IMPLICATIONS. |
| 56 | // ---------------------------------------------------------------------------- |
| 57 | // $Id$ |
| 58 | // |
| 59 | |
| 60 | // Define the front controller name and docroot |
| 61 | define('DOCROOT', getcwd().DIRECTORY_SEPARATOR); |
| 62 | define('KOHANA', substr(__FILE__, strlen(DOCROOT))); |
| 63 | |
| 64 | // Define application and system paths |
| 65 | define('APPPATH', str_replace('\\', '/', realpath($kohana_application)).'/'); |
| 66 | define('SYSPATH', str_replace('\\', '/', realpath($kohana_system)).'/'); |
| 67 | |
| 68 | // Clean up |
| 69 | unset($kohana_application, $kohana_system); |
| 70 | |
| 71 | (is_dir(APPPATH) AND is_dir(APPPATH.'/config')) or die |
| 72 | ( |
| 73 | 'Your <code>$kohana_application</code> directory does not exist. '. |
| 74 | 'Set a valid <code>$kohana_application</code> in <tt>'.KOHANA.'</tt> and refresh the page.' |
| 75 | ); |
| 76 | |
| 77 | (is_dir(SYSPATH) AND file_exists(SYSPATH.'/core/'.'Bootstrap'.EXT)) or die |
| 78 | ( |
| 79 | 'Your <code>$kohana_system</code> directory does not exist. '. |
| 80 | 'Set a valid <code>$kohana_system</code> in <tt>'.KOHANA.'</tt> and refresh the page.' |
| 81 | ); |
| 82 | |
| 83 | require SYSPATH.'core/Bootstrap'.EXT; |
Note: See TracBrowser
for help on using the browser.
