-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
73 lines (58 loc) · 1.34 KB
/
index.php
File metadata and controls
73 lines (58 loc) · 1.34 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
session_start();
ob_start();
date_default_timezone_set("Asia/Ho_Chi_Minh");
$path = str_replace('\\', '/', realpath(dirname(__FILE__)));
/**
**define __ROOT path
*/
define('__ROOT',$path);
/**
** define the site path
*/
define('__SITE_PATH', realpath(dirname(__FILE__)));
/**
** define the modules path
*/
define('__MODULES_PATH', __ROOT . '/modules');
/**
** define the systems path
*/
define('__SYSTEMS_PATH', __ROOT . '/systems');
/**
* include file config
*/
include __SYSTEMS_PATH.'/includes/Configs.php';
/**
* include file databse
*/
include __SYSTEMS_PATH.'/includes/Database.php';
$DB = new Database($configs['database']);
/**
* include file common
*/
include __SYSTEMS_PATH.'/includes/Functions.php';
/**
* set up Error Report
*/
if (defined('ENV') && ENV == 'development') {
/*
* Initialize error reporting to a known set of levels.
*
* This will be adapted in wp_debug_mode() located in wp-includes/load.php based on WP_DEBUG.
* @see http://php.net/manual/en/errorfunc.constants.php List of known error levels.
*/
error_reporting(E_ALL);
}
/**
* include file Controller
*/
include __SYSTEMS_PATH . '/core/Controller.class.php';
/**
* include file Model
*/
include __SYSTEMS_PATH . '/core/Model.class.php';
/**
* include file Router
*/
include __SYSTEMS_PATH . '/core/Request.class.php';