adlerka.top/index.php

24 lines
647 B
PHP
Raw Normal View History

2024-02-03 16:46:09 +01:00
<?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);
}
2024-02-01 09:38:16 +01:00
}
2024-02-03 16:46:09 +01:00
} catch (Exception $e){
echo $e;
}