<ol>$_W(大写W),是系统中最为重要的全局变量,微擎系统中很多常用的数据都存储在这个变量之中,下面我们详细讲解一下此变量的结构。
Array
(
[config] => Array 配置文件/data/config.php
(
[db] => 数据库配置信息
[cookie] => Cookie相关信息(作用域,前缀)
[setting] => 基本全局配置信息
[upload] => !!!废弃,统一从数据库读取!!!,上传配置信息(扩展名,路径)
)
[timestamp] => 当前时间戳
[charset] => utf-8
[clientip] => 127.0.0.1
[siteroot] => 'http://wx2.we7.cc/'; //网站URL根目录
[siteurl] => 'http://wx2.we7.cc/web/index.php?c=home&a=welcome&do=platform&'; //当前页面完整的URL
[isajax] => true //是否为AJAX请求
[ispost] => false //是否为POST请求
[cache] => Array() //系统缓存,所有通过cache_load()方法加载的缓存,均会放在这里
[attachurl_local] => 'http://pro.we7.cc/attachment/'; //指像本服务器的附件URL
[attachurl] => ['http://wx2.we7.cc/attachment/'; | 远程附件URL] 附件URL(可能是远程附件URL)
[os] => windows //当前操作系统,[windows (pc端), mobile(手机端), unknown]
[container] => wechat //手机端类型(wechat, android, ipad, iphone, ipod, unknown)
[token] => 随机token值,表单提交用于判断来源
[uid] => 1 //当前管理或是操作员UID
[username] => admin //当前管理或是操作员用户名
[user] => Array() //当前管理或是操作员信息
[isfounder] => true //是否是创始人
[uniacid] => 6 //当前公众号id
[account] = [uniaccount] => Array //当前公众号信息
(
[acid] => 6
[uniacid] => 6
[token] => fgpvlki2wqh2jdlfsk0is1bnchin3uqu
[encodingaeskey] => 1lkkB6b1s45f6C0Z5J5lHwlzDzJidQDsGOUAxmnFziQ //加密解密
//缓存公众号access_token
[access_token] => a:2:{s:5:"token";s:107:"LWIJmS64SDOmk_unZXpyne6grkPwbNQ5bK8PfWD-F2_5jsCACc99fW9ithoLNeNcRmeFJnkDkqh61jfwYTqFnfeSxqxX60tZPOkcWhjsOX4";s:6:"expire";i:1443595115;}
//缓存公众号的jsapi_ticket
[jsapi_ticket] => a:2:{s:6:"ticket";s:86:"bxLdikRXVbTPdHSM05e5uwPsbeG50dfougkSgh8HKNTd7_7m4HvINSMp9VVMJcBQ55Crc4L98SHVFvO8EQsieA";s:6:"expire";i:1443595115;}
//缓存卡劵ticket
[card_ticket] => a:2:{s:6:"ticket";s:86:"m7RQzjA_ljjEkt-JCoklRMZjsGiIHZltHaN3YXAgwdvGlaf_Hi3G38FBUWKrBBGJHT7btfalyu-Pj4GOd67TXQ";s:6:"expire";i:1440209314;}
[level] => 3 //公众号级别,普通订阅号1,普通服务号2,认证订阅号3,认证服务号4
[name] => 微擎团队
[account] => we7team
[original] => gh_4b1063013961
[signature] => 微信公众平台自助引擎,简称微擎,微擎是一款免费开源的微信公众平台管理系统,官方QQ群:32385562,官方网站:www.we7.cc
[country] =>
[province] =>
[city] =>
[username] => we7team
[password] => 123587bb93339897b3eeeb035f754dbc
[lastupdate] => 1433124942
[key] => wx2f9d7b7b086d0fd8 //公众号appid
[secret] => //公众号appsecret
[styleid] => 0
[subscribeurl] =>
[auth_refresh_token] =>
[default_acid] => 6 //默认子公号
[type] => 1
[uid] => 1
[starttime] => 1450505304
[endtime] => 0
[groups] => Array()
[grouplevel] => 2
)
[acid] => 6 //向下兼容,公众号ID
[weid] => 6 //与uniacid相同
[role] => founder // 当前管理或是操作员角色,分为创始人 founder,操作员 operator
[template] => default //当前
|