batufa/index.php

87 lines
2.3 KiB
PHP
Raw Normal View History

2008-12-05 03:37:18 +02:00
<?php
error_reporting(E_ALL | E_STRICT);
date_default_timezone_set('America/Chicago');
/**
* The directory in which your application specific resources are located.
* The application directory must contain the config/kohana.php file.
*
* @see http://docs.kohanaphp.com/install#application
*/
2008-12-05 03:37:18 +02:00
$application = 'application';
/**
* The directory in which your modules are located.
*
* @see http://docs.kohanaphp.com/install#modules
*/
2008-12-05 03:37:18 +02:00
$modules = 'modules';
/**
* The directory in which the Kohana resources are located. The system
* directory must contain the classes/kohana.php file.
*
* @see http://docs.kohanaphp.com/install#system
*/
$system = 'system';
2008-12-05 03:37:18 +02:00
/**
* The default extension of resource files. If you change this, all resources
* must be renamed to use the new extension.
*
* @see http://docs.kohanaphp.com/install#ext
*/
2008-12-05 03:37:18 +02:00
define('EXT', '.php');
/**
* End of standard configuration! Changing any of the code below should only be
* attempted by those with a working knowledge of Kohana internals.
*
* @see http://docs.kohanaphp.com/bootstrap
*
* ----------------------------------------------------------------------------
*/
// Set the full path to the docroot
define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
// Make the application relative to the docroot
if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
$application = DOCROOT.$application;
// Make the modules relative to the docroot
if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
$modules = DOCROOT.$modules;
// Make the system relative to the docroot
if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
$system = DOCROOT.$system;
// Define the absolute paths for configured directories
define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
2008-12-05 03:37:18 +02:00
// Clean up the configuration vars
2008-12-05 03:37:18 +02:00
unset($application, $modules, $system);
if (file_exists('install'.EXT))
{
// Load the installation check
return include 'install'.EXT;
2008-12-05 03:37:18 +02:00
}
// Define the start time of the application
define('KOHANA_START_TIME', microtime(TRUE));
// Load the base, low-level functions
require SYSPATH.'base'.EXT;
// Load the main Kohana class
require SYSPATH.'classes/kohana'.EXT;
// Bootstrap the application
require APPPATH.'bootstrap'.EXT;