blob: 9958b1b5a468198a30659e3b685a1fb42ae05261 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<?php /* Copyright (c) 2024 Freya Murphy */
// ========================= ENVIRONMENT ==
ini_set('html_errors', '1');
ini_set('browscap', 'browscap.ini');
date_default_timezone_set('America/New_York');
// FOLDER_ROOT
//
// define folder directiroy paths based on this file
define('PHP_ROOT', realpath(dirname(__FILE__) . '/..'));
define('WEB_ROOT', PHP_ROOT . '/web');
define('ASSET_ROOT', PHP_ROOT . '/assets');
define('PUBLIC_ROOT', PHP_ROOT . '/public');
// ========================== BOOTSTRAP ==
// load the config
require(WEB_ROOT . '/config.php');
// load all third party
require(WEB_ROOT . '/third_party/parsedown.php');
require(WEB_ROOT . '/third_party/parsedown_extra.php');
// load all the helpers
require(WEB_ROOT . '/helpers/ie.php');
require(WEB_ROOT . '/helpers/lang.php');
require(WEB_ROOT . '/helpers/aria.php');
require(WEB_ROOT . '/helpers/image.php');
require(WEB_ROOT . '/helpers/markdown.php');
require(WEB_ROOT . '/helpers/database.php');
require(WEB_ROOT . '/helpers/sanitize.php');
// load all core files
require(WEB_ROOT . '/core/core.php');
require(WEB_ROOT . '/core/component.php');
require(WEB_ROOT . '/core/controller.php');
require(WEB_ROOT . '/core/model.php');
require(WEB_ROOT . '/core/router.php');
// load file stamps
require(WEB_ROOT . '/stamp.php');
// ============================== START ==
(new Router())->handle_req();
|