24 lines
647 B
PHP
24 lines
647 B
PHP
<?php
|
|
try {
|
|
require_once 'lib/config.php';
|
|
global $routerConfig;
|
|
try {
|
|
require_once 'lib/main.php';
|
|
} catch (Exception $eMain) {
|
|
$page = file_get_contents($routerConfig["template_dir"] . "500.html");
|
|
$error_msg = "Error Message";
|
|
try {
|
|
require_once 'lib/account.php';
|
|
if (isAdmin()) {
|
|
$error_msg = $eMain;
|
|
}
|
|
} catch (Exception) {
|
|
} finally {
|
|
$page = str_replace("__TEMPLATE_ERROR__", $error_msg, $page);
|
|
echo $page;
|
|
http_response_code(500);
|
|
}
|
|
}
|
|
} catch (Exception $e){
|
|
echo $e;
|
|
} |