-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
28 lines (24 loc) · 840 Bytes
/
index.php
File metadata and controls
28 lines (24 loc) · 840 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
27
28
<?php
/*------------------------------------------------------
* 系统入口文件
* 访问模式:
* http://ip/index.php?app=app&c=order&a=buypub
*
*------------------------------------------------------
*/
date_default_timezone_set('PRC');
include './Common/bootstrop.php';
$app = isset($_GET['app']) ? $_GET['app'] : 'app';
$controller = isset($_GET['c']) ? $_GET['c'] : 'goods';
$action = isset($_GET['a']) ? $_GET['a'] : 'goodsLits';
$file = SEC_ROOT_PATH. '/' .$app. '/' .$controller.'.php';
if(is_file($file)){
defined('APP') or define('APP',$app);
defined('CONTROLLER') or define('CONTROLLER',$controller);
defined('ACTION') or define('ACTION',$action);
include $file;
$appClass = new $controller();
$appClass->$action();
}else{
throw new Exception("应用错误", 1);
}