2020-07-30 00:55:37 +00:00
|
|
|
<?php
|
2022-02-04 20:30:52 +00:00
|
|
|
namespace Makai;
|
|
|
|
|
|
|
|
require_once __DIR__ . '/../makai.php';
|
|
|
|
|
2023-10-13 18:01:07 +00:00
|
|
|
set_exception_handler(function(\Throwable $ex) {
|
|
|
|
http_response_code(500);
|
|
|
|
ob_clean();
|
|
|
|
|
|
|
|
if(MKI_DEBUG) {
|
|
|
|
header('Content-Type: text/plain; charset=utf-8');
|
|
|
|
echo (string)$ex;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
header('Content-Type: text/html; charset=utf-8');
|
|
|
|
echo file_get_contents(MKI_DIR_TEMPLATES . '/500.html');
|
|
|
|
exit;
|
|
|
|
});
|
|
|
|
|
2023-10-12 22:09:04 +00:00
|
|
|
$makai->createRouting()->dispatch();
|