4 * The directory in which your application specific resources are located.
5 * The application directory must contain the bootstrap.php file.
7 * @see http://kohanaframework.org/guide/about.install#application
9 $application = 'application';
12 * The directory in which your modules are located.
14 * @see http://kohanaframework.org/guide/about.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://kohanaframework.org/guide/about.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://kohanaframework.org/guide/about.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 * When using a legacy application with PHP >= 5.3, it is recommended to disable
45 * deprecated notices. Disable with: E_ALL & ~E_DEPRECATED
47 error_reporting(E_ALL | E_STRICT
);
50 * End of standard configuration! Changing any of the code below should only be
51 * attempted by those with a working knowledge of Kohana internals.
53 * @see http://kohanaframework.org/guide/using.configuration
56 // Set the full path to the docroot
57 define('DOCROOT', realpath(dirname(__FILE__
)).DIRECTORY_SEPARATOR
);
59 // Make the application relative to the docroot
60 if ( ! is_dir($application) AND is_dir(DOCROOT
.$application))
61 $application = DOCROOT
.$application;
63 // Make the modules relative to the docroot
64 if ( ! is_dir($modules) AND is_dir(DOCROOT
.$modules))
65 $modules = DOCROOT
.$modules;
67 // Make the system relative to the docroot
68 if ( ! is_dir($system) AND is_dir(DOCROOT
.$system))
69 $system = DOCROOT
.$system;
71 // Define the absolute paths for configured directories
72 define('APPPATH', realpath($application).DIRECTORY_SEPARATOR
);
73 define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR
);
74 define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR
);
76 // Clean up the configuration vars
77 unset($application, $modules, $system);
79 if (file_exists('install'.EXT
))
81 // Load the installation check
82 return include 'install'.EXT
;
85 // Load the base, low-level functions
86 require SYSPATH
.'base'.EXT
;
88 // Load the core Kohana class
89 require SYSPATH
.'classes/kohana/core'.EXT
;
91 if (is_file(APPPATH
.'classes/kohana'.EXT
))
93 // Application extends the core
94 require APPPATH
.'classes/kohana'.EXT
;
98 // Load empty core extension
99 require SYSPATH
.'classes/kohana'.EXT
;
102 // Bootstrap the application
103 require APPPATH
.'bootstrap'.EXT
;