2024-03-30 02:29:56 +00:00
|
|
|
<?php /* Copyright (c) 2024 Freya Murphy */
|
|
|
|
|
|
|
|
session_start();
|
|
|
|
|
|
|
|
$webroot = dirname(__FILE__);
|
|
|
|
|
2024-03-30 16:14:42 +00:00
|
|
|
// load all the helper files
|
|
|
|
require($webroot . '/helper/error.php');
|
|
|
|
require($webroot . '/helper/lang.php');
|
2024-03-30 02:29:56 +00:00
|
|
|
|
2024-03-30 16:14:42 +00:00
|
|
|
// load all the config files
|
|
|
|
require($webroot . '/config/aesthetic.php');
|
|
|
|
require($webroot . '/config/routes.php');
|
2024-03-30 02:29:56 +00:00
|
|
|
|
2024-03-30 16:14:42 +00:00
|
|
|
// load all core files
|
|
|
|
require($webroot . '/core/_controller.php');
|
|
|
|
require($webroot . '/core/_model.php');
|
|
|
|
require($webroot . '/core/database.php');
|
|
|
|
require($webroot . '/core/loader.php');
|
|
|
|
require($webroot . '/core/router.php');
|
2024-03-30 02:29:56 +00:00
|
|
|
|
|
|
|
function __init() {
|
|
|
|
$load = new Loader();
|
2024-03-30 16:14:42 +00:00
|
|
|
$router = new Router($load);
|
2024-03-30 02:29:56 +00:00
|
|
|
$router->handle_request();
|
|
|
|
};
|
|
|
|
|
|
|
|
if (!file_exists('/status/ready')) {
|
|
|
|
error_page(503, 'Service Unavailable');
|
|
|
|
}
|
|
|
|
|
|
|
|
__init();
|