This repository has been archived on 2024-08-28. You can view files and clone it, but cannot push or open issues or pull requests.
satori-services/public/index.php

22 lines
450 B
PHP
Raw Permalink Normal View History

2022-07-04 00:07:38 +00:00
<?php
2023-11-06 00:45:15 +00:00
namespace Satori;
require_once __DIR__ . '/../satori.php';
set_exception_handler(function(\Throwable $ex) {
http_response_code(500);
ob_clean();
if(SAT_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(SAT_DIR_PUBLIC . '/404.html');
exit;
});
$sat->createRouting()->dispatch();