4 * The directory in which your application specific resources are located.
5 * The application directory must contain the config/kohana.php file.
7 * @see http://docs.kohanaphp.com/install#application
9 $application = 'application';
12 * The directory in which your modules are located.
14 * @see http://docs.kohanaphp.com/install#modules
19 * The directory in which the Kohana resources are located. The system
20 * directory must contain the classes/kohana.php file.
22 * @see http://docs.kohanaphp.com/install#system
27 * The default extension of resource files. If you change this, all resources
28 * must be renamed to use the new extension.
30 * @see http://docs.kohanaphp.com/install#ext
32 define('EXT', '.php');
35 * Set the PHP error reporting level. If you set this in php.ini, you remove this.
36 * @see http://php.net/error_reporting
38 * When developing your application, it is highly recommended to enable notices
39 * and strict warnings. Enable them by using: E_ALL | E_STRICT
41 * In a production environment, it is safe to ignore notices and strict warnings.
42 * Disable them by using: E_ALL ^ E_NOTICE
44 error_reporting(E_ALL | E_STRICT
);
47 * End of standard configuration! Changing any of the code below should only be
48 * attempted by those with a working knowledge of Kohana internals.
50 * @see http://docs.kohanaphp.com/bootstrap
53 // Set the full path to the docroot
54 define('DOCROOT', realpath(dirname(__FILE__
)).DIRECTORY_SEPARATOR
);
56 // Make the application relative to the docroot
57 if ( ! is_dir($application) AND is_dir(DOCROOT
.$application))
58 $application = DOCROOT
.$application;
60 // Make the modules relative to the docroot
61 if ( ! is_dir($modules) AND is_dir(DOCROOT
.$modules))
62 $modules = DOCROOT
.$modules;
64 // Make the system relative to the docroot
65 if ( ! is_dir($system) AND is_dir(DOCROOT
.$system))
66 $system = DOCROOT
.$system;
68 // Define the absolute paths for configured directories
69 define('APPPATH', realpath($application).DIRECTORY_SEPARATOR
);
70 define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR
);
71 define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR
);
73 // Clean up the configuration vars
74 unset($application, $modules, $system);
76 if (file_exists('install'.EXT
))
78 // Load the installation check
79 return include 'install'.EXT
;
82 // Define the start time of the application
83 define('KOHANA_START_TIME', microtime(TRUE));
85 // Load the base, low-level functions
86 require SYSPATH
.'base'.EXT
;
88 // Load the main Kohana class
89 require SYSPATH
.'classes/kohana'.EXT
;
91 // Bootstrap the application
92 require APPPATH
.'bootstrap'.EXT
;