-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.php
More file actions
27 lines (21 loc) · 810 Bytes
/
init.php
File metadata and controls
27 lines (21 loc) · 810 Bytes
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
<?php
if ( PHP_SAPI === 'cli' ) {
define('METHOD', 'cli');
} else if ( isset($_SERVER['REQUEST_METHOD']) ) {
define('METHOD', $_SERVER['REQUEST_METHOD']);
} else {
die( 'Unknow Method' );
}
define('ROOT_PATH', __DIR__ .'/');
foreach ( glob(ROOT_PATH.'config/config\.*\.php') AS $filename ) {
if ( ROOT_PATH.'config/config.local.php' !== $filename )
include_once $filename;
}
if ( !is_file( ROOT_PATH.'config/config.local.php') )
die('ERROR: Missing Config File; '.ROOT_PATH.'config/config.local.php');
include_once ROOT_PATH.'config/config.local.php';
include_once ROOT_PATH.'functions/common.php';
include_once ROOT_PATH.'functions/io.php';
include_once ROOT_PATH.'functions/log.php';
include_once ROOT_PATH.'classes/api.responses.php';
include_once ROOT_PATH.'classes/class.preseem.php';