32 lines
749 B
PHP
32 lines
749 B
PHP
<?php /* Copyright (c) 2024 Freya Murphy */
|
|
|
|
session_start();
|
|
|
|
$webroot = dirname(__FILE__);
|
|
|
|
// load all the helper files
|
|
require($webroot . '/helper/error.php');
|
|
require($webroot . '/helper/lang.php');
|
|
|
|
// load all the config files
|
|
require($webroot . '/config/aesthetic.php');
|
|
require($webroot . '/config/routes.php');
|
|
|
|
// 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');
|
|
|
|
function __init() {
|
|
$load = new Loader();
|
|
$router = new Router($load);
|
|
$router->handle_request();
|
|
};
|
|
|
|
if (!file_exists('/status/ready')) {
|
|
error_page(503, 'Service Unavailable');
|
|
}
|
|
|
|
__init();
|