website/src/web/index.php

39 lines
1 KiB
PHP
Raw Normal View History

2024-05-24 13:05:42 +00:00
<?php /* Copyright (c) 2024 Freya Murphy */
ini_set('html_errors', '1');
$webroot = dirname(__FILE__);
$assetroot = realpath(dirname(__FILE__) . '/../assets');
$publicroot = realpath(dirname(__FILE__) . '/../public');
$main_model = NULL;
// loadd all third party
require($webroot . '/third_party/parsedown.php');
require($webroot . '/third_party/parsedown_extra.php');
// load all the config files
require($webroot . '/config/routes.php');
require($webroot . '/config/style.php');
// load all the helpers
require($webroot . '/helpers/lang.php');
require($webroot . '/helpers/aria.php');
require($webroot . '/helpers/image.php');
require($webroot . '/helpers/markdown.php');
require($webroot . '/helpers/database.php');
require($webroot . '/helpers/sanitize.php');
// load all core files
require($webroot . '/core/_controller.php');
require($webroot . '/core/_model.php');
require($webroot . '/core/loader.php');
require($webroot . '/core/router.php');
function __init() {
$load = new Loader();
$router = new Router($load);
$router->handle_request();
};
__init();