29 lines
801 B
PHP
29 lines
801 B
PHP
<?php
|
|
|
|
// Change this in a live environment!
|
|
error_reporting((-1) & ~(E_ERROR | E_PARSE));
|
|
|
|
// Set the default paths
|
|
define('BASE_PATH', __DIR__);
|
|
define('SYS_PATH', __DIR__.'/sys/');
|
|
define('MOD_PATH', __DIR__.'/modules/');
|
|
define('APP_PATH', __DIR__.'/app/');
|
|
|
|
$ri = $_SERVER['REQUEST_URI'];
|
|
$ind_pos = stripos($ri, "index.php");
|
|
$default_path = ($ind_pos !== FALSE) ? substr($ri, 0, $ind_pos) : $ri;
|
|
$default_baseurl = "//" . str_replace("//", "/", $_SERVER['HTTP_HOST']. $default_path);
|
|
|
|
// Require the basic configuratio file
|
|
require(APP_PATH.'config/config.php');
|
|
|
|
// Require the most important files
|
|
require(SYS_PATH . "common.php");
|
|
|
|
//Set error handlers
|
|
register_shutdown_function('shutdown');
|
|
set_error_handler('on_error');
|
|
set_exception_handler('on_exception');
|
|
|
|
// And away we go!
|
|
route(); |