35 lines
957 B
PHP
35 lines
957 B
PHP
<?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'] .= '/';
|
|
} |