-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapplication.php
executable file
·58 lines (51 loc) · 1.55 KB
/
application.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
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
<?php
/**
* FW 框架启动文件 使用请调用RUN方法
* @category FW
* @package framework
* @author 陆春宇
*/
//begin();
$app_path = ''; //动态APP项目加载名称(不可删除,使用方式见 function A())
/**
* 框架初始类
*/
class APP {
public function __construct() {
require( FW_PATH . '/common/function.php');
require_cache(FW_PATH . '/config/conf.common.php');
require_cache(FW_PATH . '/config/conf.core.php');
require_cache(FW_PATH . '/core/FW/FWRoute.php');
require_cache(FW_PATH . '/core/FW/FW.php');
require_cache(FW_PATH . '/core/FW/FWLibBase.php');
require_cache(FW_PATH . '/core/FW/FWException.php');
Route::checkRoute();
if (!empty($_POST['uid'])) {
$this->accessLog($_POST['uid']);
} else {
$this->accessLog();
}
}
public function accessLog($uid = '') {
$conf = getConf();
if (!$conf['LOG']['ACCESS_STATE']) {
return;
}
$logModel = P('LOG', $conf['LOG']);
$logModel->access($uid);
}
/**
* 启动方法
*/
public static function RUN() {
$app = new APP();
$CatFramework = new FW();
$CatFramework->init();
}
public static function MODULE($appname) {
if (!file_exists(DIR_PATH . '/app_' . $appname . '/index.php')) {
$appname = BASE_APP;
}
require DIR_PATH . '/app_' . $appname . '/index.php';
}
}