xssbook2/web/index.php

33 lines
749 B
PHP
Raw Normal View History

<?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 16:14:42 +00:00
// load all the config files
require($webroot . '/config/aesthetic.php');
require($webroot . '/config/routes.php');
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');
function __init() {
$load = new Loader();
2024-03-30 16:14:42 +00:00
$router = new Router($load);
$router->handle_request();
};
if (!file_exists('/status/ready')) {
error_page(503, 'Service Unavailable');
}
__init();