Added error handler

This commit is contained in:
2017-09-07 16:11:54 +07:00
parent 796148a532
commit 23622bc5a8
14 changed files with 204 additions and 56 deletions

View File

@@ -1,8 +1,16 @@
<?php
session_start();
ini_set("display_errors", "on");
error_reporting(E_ALL);
// Autoload
require_once dirname(__DIR__).'/vendor/autoload.php';
// Errors Handler
set_error_handler("Core\Error::errorHandler");
set_exception_handler("Core\Error::exceptionHandler");
if (Core\Session::exists('info')) {
echo Core\Session::flash('info');
echo "<br>";