系统内置的手机端全局变量(二次开发手册,按 Ctrl + F 查询)
$_W['uniacid'] //公众号编号
$_W['account']['key']; //公众号appid,如:wx1cdcd2zhiwu55com5d3b63
$_W['account']['secret']; //公众号密钥,如:"6b1c05b33bf06czhiwu55com66555fd62bb2e"
$_W['account']['setting']['payment']['wechat']['apikey']; //公众号在参数设置那里的支付密钥,如:"HZW7C5F6FE183C077A5wwwzhiwu55com"
$_W['account']['setting']['payment']['wechat']['mchid']; //微信支付商户号,如:155*4*6031
$_W['account']['level']; //接入的类型,如果是4表示认证服务号
$_W['account']['isconnect']; //是否已经成功接入,如果1表示成功接入公众号
$_W['clientip'] //客户端IP,如:ROOT.clientip
$_W['siteroot'] //网站访问域名地址,如:"http://www.zhiwu55.com/"
$_W['siteurl'] //当前地址,如:"http://www.zhiwu55.com/web/index.php?c=site&a=entry&eid=237&version_id=0"
$_W['os'] //当前客户端设置环境,如:"windows"
$_W['container'] //当前客户端设置环境,如:"wechat"
$_W['current_module']['version']; //当前模块应用的版本号,在分享朋友圈奖红包模块中的值:6.1.4
$_W['current_module']['config']; //在模块参数设置那里的数值,即settings的数组值
$_W['account']['jssdkconfig']; //分享转发的jssdk参数
$_W['fans']['nickname']; //微信昵称
$_W['fans']['headimgurl']; //微信头像
$_W['fans']['tag']['subscribe_time']; //猜测,首次把微信个人信息写入系统数据库的时间
$_W['fans']['updatetime']; //猜测,这个微信号个人信息,近期更新时间。
$_W['fans']['follow']; // 如果1表示关注了公众号,如果用 $_W['fans']['follow']!=1 来检测有没有关注公众号,不等于1表示未关注公众号
{
"config": {
"cookie": {
"pre": "ZkPh_",
"domain": "",
"path": "/"
},
"setting": {
"charset": "utf-8",
"cache": "mysql",
"timezone": "Asia/Shanghai",
"memory_limit": "256M",
"filemode": 420,
"authkey": "WoTJOF1Q",
"founder": "1",
"development": 1,
"referrer": 0,
"memcache": {
"server": "",
"port": 11211,
"pconnect": 1,
"timeout": 30,
"session": 1
},
"proxy": {
"host": "",
"auth": ""
}
},
"upload": {
"image": {
"extentions": ["gif", "jpg", "jpeg", "png"],
"limit": 5000
},
"attachdir": "attachment",
"audio": {
"extentions": ["mp3"],
"limit": 5000
}
},
"db": {
"tablepre": "ims_",
"slave_status": false
}
},
"timestamp": 1617451577,
"charset": "utf-8",
"clientip": "163.204.162.229",
"ishttps": false,
"isajax": false,
"ispost": false,
"sitescheme": "http://",
"script_name": "/app/index.php",
"siteroot": "http://www.zhiwu55.com/",
"siteurl": "http://www.zhiwu55.com/app/index.php?i=2&c=entry&do=Hzwenter&m=hzw_friends&news_id=zqHqV7B37HqHh24a4hM766wFw003QX&wxref=mp.weixin.qq.com",
"uid": 0,
"uniacid": 2,
"setting": {
"copyright": {
"slides": ["https://img.alicdn.com/tps/TB1pfG4IFXXXXc6XXXXXXXXXXXX.jpg", "https://img.alicdn.com/tps/TB1sXGYIFXXXXc5XpXXXXXXXXXX.jpg", "https://img.alicdn.com/tps/TB1h9xxIFXXXXbKXXXXXXXXXXXX.jpg"],
"icps": [],
"develop_status": 1,
"log_status": 1
},
"authmode": 1,
"close": {
"status": "0",
"reason": ""
},
"register": {
"open": 1,
"verify": 0,
"code": 1,
"groupid": 1
},
"site": {
"key": 256689,
"token": "e62d3bf9a61fb37d93d7066e3296b6ec",
"url": "http://www.zhiwu55.com",
"version": "2.6.5",
"release": "202008170002",
"name": "http://www.zhiwu55.com的站点",
"family": "v",
"profile_perfect": false
},
"cloudip": {
"ip": "36.25.253.182",
"expire": 1617365022
},
"module_receive_ban": [],
"global_oauth": {
"oauth": {
"account": 2,
"host": "http://www.zhiwu55.com"
}
},
"upload": {
"image": {
"extentions": ["gif", "jpg", "jpeg", "png"],
"limit": 5000
},
"attachdir": "attachment",
"audio": {
"extentions": ["mp3"],
"limit": 5000
}
},
"remote_complete_info": null
},
"os": "mobile",
"container": "wechat",
"platform": "account",
"account": {
"acid": "2",
"uniacid": "2",
"token": "gI3Ie4z63YBX0b4t9bBoK9X4swI977Xw",
"encodingaeskey": "zdkIb1DupD31y0Ky0iKzhzHDyhUP3H3h8iT3h19ZI0u",
"level": "4",
"name": "智伍应用开发",
"account": "wwwzhiwu55vip",
"original": "gh_04b68cx9xdx4",
"signature": "",
"country": "",
"province": "",
"city": "",
"username": "",
"password": "",
"lastupdate": "0",
"key": "wx1cdczhiwu55com915d3b63",
"secret": "6b1c05b33zhiwu55com879c466555fd62bb2e",
"styleid": "0",
"subscribeurl": "",
"auth_refresh_token": "",
"encrypt_key": "wx1cdczhiwu55com915d3b63",
"hash": "riLE6UO9",
"type": "1",
"isconnect": "1",
"isdeleted": "0",
"endtime": "0",
"send_account_expire_status": "0",
"send_api_expire_status": "0",
"groupid": "0",
"description": "",
"default_acid": "2",
"rank": null,
"title_initial": "Z",
"createtime": "",
"logo": "http://www.zhiwu55.com/attachment/images/global/a9Tr3RfyBcZJ23Tf7Ptyy7W397HH7i.jpg",
"qrcode": "http://www.zhiwu55.com/attachment/images/global/KC11LAeBLeClEIe304X1o4QiBI8iFf.jpg",
"create_uid": "1",
"type_sign": "account",
"starttime": "0",
"groups": {
"2": {
"groupid": "2",
"uniacid": "2",
"title": "默认会员组",
"credit": "0",
"isdefault": "1"
}
},
"setting": {
"uniacid": "2",
"passport": "",
"oauth": "",
"jsauth_acid": "0",
"notify": "",
"creditnames": {
"credit1": {
"title": "积分",
"enabled": 1
},
"credit2": {
"title": "余额",
"enabled": 1
}
},
"creditbehaviors": {
"activity": "credit1",
"currency": "credit2"
},
"welcome": "关注公众号领红包",
"default": "",
"default_message": {
"trace": {
"type": "module",
"module": "zhiwu55cn_readnum"
}
},
"payment": {
"wechat": {
"recharge_switch": "false",
"pay_switch": "false",
"switch": 1,
"has_config": "false",
"recharge_set": "true",
"support_set": "true",
"borrow": "",
"service": "",
"version": 2,
"mchid": 155x42x031,
"apikey": "HZW7C5F6FE183C077A5wwwzhiwu55com",
"account": "2",
"signkey": "HZW7C5F6FE183C077A5wwwzhiwu55com"
}
},
"stat": "",
"default_site": "2",
"sync": "0",
"recharge": "",
"tplnotice": "",
"grouplevel": "0",
"mcplugin": "",
"exchange_enable": "0",
"coupon_type": "0",
"menuset": "a:1:{s:12:\"menu_display\";i:1;}",
"statistics": "",
"bind_domain": "",
"comment_status": "0",
"reply_setting": "0",
"default_module": "",
"attachment_limit": "0",
"attachment_size": "1092",
"sync_member": "0",
"remote": ""
},
"grouplevel": "0",
"type_name": "公众号",
"switchurl": "./index.php?c=account&a=display&do=switch&uniacid=2",
"setmeal": {
"uid": -1,
"username": "创始人",
"timelimit": "未设置",
"groupid": "-1",
"groupname": "所有服务"
},
"current_user_role": null,
"is_star": 0,
"manageurl": "http://www.zhiwu55.com/web/index.php?c=account&a=post&uniacid=2&account_type=1",
"accessurl": "http://www.zhiwu55.com/web/index.php?c=account&a=post&uniacid=2&account_type=1",
"roleurl": "http://www.zhiwu55.com/web/index.php?c=account&a=post-user&do=edit&uniacid=2&account_type=1",
"oauth": {
"key": "wx1cdczhiwu55com915d3b63",
"secret": "6b1c05b33zhiwu55com879c466555fd62bb2e",
"acid": "2",
"type": "1",
"level": "4",
"support_oauthinfo": 1,
"support_jssdk": 1
},
"jssdkconfig": {
"appId": "wx1cdczhiwu55com915d3b63",
"nonceStr": "Ir2Q2oUFqf8uIiUG",
"timestamp": "1617451577",
"signature": "f4b1f0c1dbb8643a06xax3x5x8dc85d5279eb607",
"url": "http://www.zhiwu55.com/app/index.php?i=2&c=entry&do=Hzwenter&m=hzw_friends&news_id=zqHqV7B37HqHh24a4hM766wFw003QX&wxref=mp.weixin.qq.com",
"string1": "jsapi_ticket=kgt8ON7yVITDhtdwci0qedKvDY4uy61Nli1WXVZVmLPHQGNPOPLLjUTZzOaZZk0AxzmopQ7q830rkOdvG58COA&noncestr=Ir2Q2oUFqf8uIiUG×tamp=1617451577&url=http://www.zhiwu55.com/app/index.php?i=2&c=entry&do=Hzwenter&m=hzw_friends&news_id=zqHqV7B37HqHh24a4hM766wFw003QX&wxref=mp.weixin.qq.com",
"name": "智伍应用开发"
},
"jsauth_acid": "2"
},
"uniaccount": {
"acid": "2",
"uniacid": "2",
"token": "gI3Ie4z63YBX0b4t9bBoK9X4swI977Xw",
"encodingaeskey": "zdkIb1DupD31y0Ky0iKzhzHDyhUP3H3h8iT3h19ZI0u",
"level": "4",
"name": "智伍应用开发",
"account": "wwwzhiwu55vip",
"original": "gh_04b68cx9xdx4",
"signature": "",
"country": "",
"province": "",
"city": "",
"username": "",
"password": "",
"lastupdate": "0",
"key": "wx1cdczhiwu55com915d3b63",
"secret": "6b1c05b33zhiwu55com879c466555fd62bb2e",
"styleid": "0",
"subscribeurl": "",
"auth_refresh_token": "",
"encrypt_key": "wx1cdczhiwu55com915d3b63",
"hash": "riLE6UO9",
"type": "1",
"isconnect": "1",
"isdeleted": "0",
"endtime": "0",
"send_account_expire_status": "0",
"send_api_expire_status": "0",
"groupid": "0",
"description": "",
"default_acid": "2",
"rank": null,
"title_initial": "Z",
"createtime": "",
"logo": "http://www.zhiwu55.com/attachment/images/global/a9Tr3RfyBcZJ23Tf7Ptyy7W397HH7i.jpg",
"qrcode": "http://www.zhiwu55.com/attachment/images/global/KC11LAeBLeClEIe304X1o4QiBI8iFf.jpg",
"create_uid": "1",
"type_sign": "account",
"starttime": "0",
"groups": {
"2": {
"groupid": "2",
"uniacid": "2",
"title": "默认会员组",
"credit": "0",
"isdefault": "1"
}
},
"setting": {
"uniacid": "2",
"passport": "",
"oauth": "",
"jsauth_acid": "0",
"notify": "",
"creditnames": {
"credit1": {
"title": "积分",
"enabled": 1
},
"credit2": {
"title": "余额",
"enabled": 1
}
},
"creditbehaviors": {
"activity": "credit1",
"currency": "credit2"
},
"welcome": "关注公众号领红包",
"default": "",
"default_message": {
"trace": {
"type": "module",
"module": "zhiwu55cn_readnum"
}
},
"payment": {
"wechat": {
"recharge_switch": "false",
"pay_switch": "false",
"switch": 1,
"has_config": "false",
"recharge_set": "true",
"support_set": "true",
"borrow": "",
"service": "",
"version": 2,
"mchid": 155x42x031,
"apikey": "HZW7C5F6FE183C077A5wwwzhiwu55com",
"account": "2",
"signkey": "HZW7C5F6FE183C077A5wwwzhiwu55com"
}
},
"stat": "",
"default_site": "2",
"sync": "0",
"recharge": "",
"tplnotice": "",
"grouplevel": "0",
"mcplugin": "",
"exchange_enable": "0",
"coupon_type": "0",
"menuset": "a:1:{s:12:\"menu_display\";i:1;}",
"statistics": "",
"bind_domain": "",
"comment_status": "0",
"reply_setting": "0",
"default_module": "",
"attachment_limit": "0",
"attachment_size": "1092",
"sync_member": "0",
"remote": ""
},
"grouplevel": "0",
"type_name": "公众号",
"switchurl": "./index.php?c=account&a=display&do=switch&uniacid=2",
"setmeal": {
"uid": -1,
"username": "创始人",
"timelimit": "未设置",
"groupid": "-1",
"groupname": "所有服务"
},
"current_user_role": null,
"is_star": 0,
"manageurl": "http://www.zhiwu55.com/web/index.php?c=account&a=post&uniacid=2&account_type=1",
"accessurl": "http://www.zhiwu55.com/web/index.php?c=account&a=post&uniacid=2&account_type=1",
"roleurl": "http://www.zhiwu55.com/web/index.php?c=account&a=post-user&do=edit&uniacid=2&account_type=1",
"oauth": {
"key": "wx1cdczhiwu55com915d3b63",
"secret": "6b1c05b33zhiwu55com879c466555fd62bb2e",
"acid": "2",
"type": "1",
"level": "4",
"support_oauthinfo": 1,
"support_jssdk": 1
},
"jssdkconfig": {
"appId": "wx1cdczhiwu55com915d3b63",
"nonceStr": "Ir2Q2oUFqf8uIiUG",
"timestamp": "1617451577",
"signature": "f4b1f0c1dbb8643a06xax3x5x8dc85d5279eb607",
"url": "http://www.zhiwu55.com/app/index.php?i=2&c=entry&do=Hzwenter&m=hzw_friends&news_id=zqHqV7B37HqHh24a4hM766wFw003QX&wxref=mp.weixin.qq.com",
"string1": "jsapi_ticket=kgt8ON7yVITDhtdwci0qedKvDY4uy61Nli1WXVZVmLPHQGNPOPLLjUTZzOaZZk0AxzmopQ7q830rkOdvG58COA&noncestr=Ir2Q2oUFqf8uIiUG×tamp=1617451577&url=http://www.zhiwu55.com/app/index.php?i=2&c=entry&do=Hzwenter&m=hzw_friends&news_id=zqHqV7B37HqHh24a4hM766wFw003QX&wxref=mp.weixin.qq.com",
"name": "智伍应用开发"
},
"jsauth_acid": "2"
},
"acid": "2",
"session_id": "0463b003ca84a5bc5f89375c76a3ecaa",
"openid": "oUudxv8xbfxLiHGL2_ssLKB14YA4",
"fans": {
"fanid": "1",
"acid": "2",
"uniacid": "2",
"uid": "1",
"openid": "oUudxv8xbfxLiHGL2_ssLKB14YA4",
"nickname": "风云",
"groupid": "",
"salt": "QO5gcykC",
"follow": "1",
"followtime": "1617188069",
"unfollowtime": "1617187293",
"tag": {
"id": "1",
"uniacid": "0",
"fanid": "1",
"openid": "oUudxv8xbfxLiHGL2_ssLKB14YA4",
"subscribe": "1",
"nickname": "风云",
"sex": "1",
"language": "zh_CN",
"city": "河源",
"province": "广东",
"country": "中国",
"headimgurl": "http://thirdwx.qlogo.cn/mmopen/k7W9SxtoibDCjBARDwRnRgwiah6eUicJk6wOJkXvNmv4pPmcYdciaUEFfdCUblnkp4WUKGg5QW3vnVSbLukOQPnrocuJRZP7s8zM/132",
"subscribe_time": "1616203195",
"unionid": "",
"remark": "",
"groupid": "0",
"tagid_list": "s:6:\"a:0:{}\";",
"subscribe_scene": "",
"qr_scene_str": "",
"qr_scene": "",
"avatar": "http://thirdwx.qlogo.cn/mmopen/k7W9SxtoibDCjBARDwRnRgwiah6eUicJk6wOJkXvNmv4pPmcYdciaUEFfdCUblnkp4WUKGg5QW3vnVSbLukOQPnrocuJRZP7s8zM/132"
},
"updatetime": "1617451546",
"unionid": "",
"user_from": "0",
"sex": "1",
"gender": "1",
"headimgurl": "http://thirdwx.qlogo.cn/mmopen/k7W9SxtoibDCjBARDwRnRgwiah6eUicJk6wOJkXvNmv4pPmcYdciaUEFfdCUblnkp4WUKGg5QW3vnVSbLukOQPnrocuJRZP7s8zM/132",
"avatar": "http://thirdwx.qlogo.cn/mmopen/k7W9SxtoibDCjBARDwRnRgwiah6eUicJk6wOJkXvNmv4pPmcYdciaUEFfdCUblnkp4WUKGg5QW3vnVSbLukOQPnrocuJRZP7s8zM/132",
"from_user": "oUudxv8xbfxLiHGL2_ssLKB14YA4"
},
"member": {
"uid": "1",
"realname": "",
"mobile": "",
"email": "954702676540e0078b9c5576bb6555a0@baidu.cc",
"groupid": "2",
"credit1": "100.00",
"credit2": "0.00",
"credit6": "0.00",
"groupname": "默认会员组"
},
"oauth_account": {
"key": "wx1cdczhiwu55com915d3b63",
"secret": "6b1c05b33zhiwu55com879c466555fd62bb2e",
"acid": "2",
"type": "1",
"level": "4",
"support_oauthinfo": 1,
"support_jssdk": 1
},
"token": "ZlOm",
"attachurl_local": "http://www.zhiwu55.com/attachment/",
"attachurl": "http://www.zhiwu55.com/attachment/",
"template": "default",
"styles": [],
"page": {
"title": "智伍应用开发"
},
"current_module": {
"mid": "56",
"name": "hzw_friends",
"application_type": "1",
"type": "activity",
"title": "分享朋友圈奖红包",
"version": "6.1.4",
"ability": "分享指定的内容到朋友圈,被朋友圈的好友浏览了内容,分享者可以领到一个红包,每个人限领取一次。",
"description": "安装此应用之后,可以在后台自由编辑一篇文章,内容可以是广告、企业品牌、运营活动等等,然后任何一个微信好友把文章分享到朋友圈或者转发给好友,文章达到一定阅读量之后自动奖励一个红包给分享文章的人,此应用能在短时间内,通过微信现金红包的营销推广,能够把一篇文章在微信里面引爆,成为大家都关注的热点内容!!",
"author": "myqq155120699",
"url": "",
"settings": "1",
"subscribes": [],
"handles": ["text"],
"isrulefields": "1",
"issystem": "0",
"target": "0",
"iscard": "0",
"permissions": "N;",
"title_initial": "F",
"wxapp_support": "1",
"welcome_support": "1",
"oauth_type": "1",
"webapp_support": "1",
"phoneapp_support": "1",
"account_support": "2",
"xzapp_support": "0",
"aliapp_support": "1",
"logo": "http://www.zhiwu55.com/addons/hzw_friends/icon.jpg",
"baiduapp_support": "1",
"toutiaoapp_support": "1",
"from": "local",
"cloud_record": "1",
"sections": "0",
"label": "",
"isdisplay": 1,
"preview": "http://www.zhiwu55.com/addons/hzw_friends/preview.jpg?v=1617274075",
"main_module": false,
"recycle_info": [],
"config": {
"hzwAppid": "wx1cdczhiwu55com915d3b63",
"hzwAppSecret": "6b1c05b33zhiwu55com879c466555fd62bb2e",
"hzwApiclient_cert": "/www/wwwroot/www.zhiwu55.com/addons/hzw_friends/pem/cert077934e06a6249bec9316d0ac3cf12fb.pem",
"hzwApiclient_key": "/www/wwwroot/www.zhiwu55.com/addons/hzw_friends/pem/keyf6e9a1151376799b98dce718f062d62c.pem",
"hzwRootca": null,
"hzwMch_id": "155x42x031",
"hzwClient_ip": "118.31.125.192",
"hzwApiKey": "HZW7C5F6FE183C077A5wwwzhiwu55com",
"spec_mch": "0",
"hzw_wxappid": "",
"only_one": "2",
"only_one_hint": "太多人抢红包了,有点拥挤,刚才的那个红包被别人先抢走了,红包还有,排队领取,请继续参于抢红包!",
"hzwCannonFodder_01": null,
"hzwCannonFodder_02": null,
"hzwCannonFodder_03": null
},
"enabled": "1",
"displayorder": "0",
"shortcut": "0",
"module_shortcut": null
}
}