-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.php
34 lines (30 loc) · 1.09 KB
/
init.php
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
<?php
/****************************************************************/
# Read Me
# - The project requires php8 version (or higher).
#
# - Do NOT output anything in this page.
#
/****************************************************************/
# Initialize
date_default_timezone_set('Asia/Taipei');
define('INIT', true);
require('config.php');
/****************************************************************/
# Init
if(!INIT){ die(MSG_MAINTAIN); }
# Debug mode will display all errors
if(DEBUG){ ini_set('display_errors',1); error_reporting(E_ALL); } else{ ini_set('display_errors',0); error_reporting(0); }
# Check libs
foreach (Libraries as $library)
if(!extension_loaded($library))
if(DEV) die("Library '{$library}' not even be installed.");
/****************************************************************/
# Init
# Classes
$filenames = glob(Local.Path::clas.Path::init."*.php");
# Functions
array_push($filenames, ...glob(Local.Path::func.Path::init."*.php"));
# Loading
foreach($filenames as $filename){ require($filename); }
/****************************************************************/