添加后台代理代码
This commit is contained in:
35
codes/agent/game/api/framework/bootstrap.inc.php
Normal file
35
codes/agent/game/api/framework/bootstrap.inc.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
define('IN_IA', true);
|
||||
define('STARTTIME', microtime());// 返回当前 Unix 时间戳和微秒数
|
||||
// 定义系统根目录
|
||||
define('IA_ROOT', str_replace("\\", '/', dirname(dirname(__FILE__))));
|
||||
|
||||
define('TIMESTAMP', time());
|
||||
|
||||
|
||||
$_W = array();
|
||||
$_W['charset'] = "utf8";
|
||||
// 加载系统加载器
|
||||
require IA_ROOT . '/framework/class/loader.class.php';
|
||||
require IA_ROOT.'/framework/class/weixin.account.class.php';
|
||||
load()->func('global');
|
||||
load()->func('compat');
|
||||
// 加载用户管理模块
|
||||
load()->model('user');
|
||||
// 加载缓存处理器
|
||||
load()->func('cache');
|
||||
|
||||
// 得到客户端的IP
|
||||
define('CLIENT_IP', getip());
|
||||
|
||||
error_reporting(0);
|
||||
//error_reporting(E_ALL | E_STRICT);
|
||||
|
||||
|
||||
// 获取网站根路径
|
||||
$sitepath = substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/'));
|
||||
// 网站访问根url
|
||||
$_W['siteroot'] = htmlspecialchars('http://' . $_SERVER['HTTP_HOST'] . $sitepath);
|
||||
if(substr($_W['siteroot'], -1) != '/') {
|
||||
$_W['siteroot'] .= '/';
|
||||
}
|
||||
Reference in New Issue
Block a user