Exemple #1
0
/**
 * Error Handling
 */
ini_set('display_errors', 'On');
ini_set('error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE);
error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE);
/**
 * Constants and Config
 */
define("DEBUG_MODE", 1);
define("ROOT_DIR", __DIR__);
/**
 * Initialize Framework Class-Loader
 */
require ROOT_DIR . "/framework/bootstrap.php";
/**
 * Initialize custom error handler
 */
use Base\ErrorHandler;
set_error_handler(array(new ErrorHandler(), "log_error"), E_ALL ^ E_NOTICE ^ E_WARNING);
set_exception_handler(array(new ErrorHandler(), "log_exception"));
register_shutdown_function(array(new ErrorHandler(), "check_for_fatal"));
/**
 * Activate Stargate
 */
use Base\Application;
$application = new Application();
$application->run();
/*
print (microtime(true)-$time). ' seconds and '. (memory_get_usage()-$memory). ' bytes';
*/