为了账号安全,请及时绑定邮箱和手机立即绑定

我扫了二维码结果手机出现一个空白页?

我扫了二维码结果手机出现一个空白页?

PHP
慕少336928 2018-04-16 16:16:40
public function getBaseInfo() { $app_id = 'wxe103b4f7bbaeb1c6'; //公众号appid $redirect_uri = urlencode("http://whltest.applinzi.com/www/wechat/public/index.php/index/index/access_token_info"); $url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=".$app_id."&redirect_uri=".$redirect_uri."&response_type=code&scope=snsapi_userinfo &state=123#wechat_redirect"; header('Location:'.$url);exit; }public function access_token_info(){$app_id = 'wxe103b4f7bbaeb1c6';$app_secret = '7212da94e0a385b08c5de46ffef61740';$code = $GET['code'];$url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=".$app_id."&secret=".$app_secret."&code=".$code."&grant_type=authorization_code";$res = $this->http_curl($url);var_dump($res);$access_token = $res['access_token'];$openid = $res['openid'];$url = "https://api.weixin.qq.com/sns/userinfo?access_token=".$access_token."&openid=".$openid."&lang=zh_CN";$res = $this->http_curl($url);var_dump($res);}
查看完整描述

目前暂无任何回答

  • 0 回答
  • 0 关注
  • 1959 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信