Initial commit

This commit is contained in:
2024-06-01 22:48:57 +02:00
commit 8a570558ff
11 changed files with 1197 additions and 0 deletions

20
src/base.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
function handle_error(Exception $error) :void
{
error_log(
'ERROR: '.$error->getMessage().' in '.$error->getFile().':'.$error->getLine().
PHP_EOL.'Stack trace:'.PHP_EOL.$error->getTraceAsString()
);
http_response_code(500);
\App\template\Error::printError(500);
die();
}
function redirect($uri) :void
{
header('Location: '.BASE.$uri);
die();
}