forked from eaterplanet/EP-Admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwxapp.php
25 lines (25 loc) · 762 Bytes
/
wxapp.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
<?php
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
die('require PHP > 5.3.0 !');
}
header("Content-Type:text/html; charset=utf-8");
define('APP_DEBUG', true);
define('BIND_MODULE', 'Home');
define('APP_PATH', './Modules/');
$wx_controller = $_REQUEST['controller'];
$wx_controller_arr = explode('.', $wx_controller);
if (!isset($wx_controller_arr[1])) {
$wx_controller_arr[1] = 'index';
}
unset($_GET['i']);
unset($_GET['t']);
unset($_GET['v']);
unset($_GET['from']);
unset($_GET['do']);
$_GET['c'] = $wx_controller_arr[0];
$_GET['a'] = $wx_controller_arr[1];
unset($_GET['controller']);
unset($_GET['m']);
define('ROOT_PATH', str_replace('\\', '/', dirname(__FILE__)) . '/');
define('RUNTIME_PATH', './Runtime/');
require './ThinkPHP/ThinkPHP.php';