Browse Source

test

master
用户名 3 years ago
parent
commit
11636d22e4
  1. 1
      mobile/blank.php

1
mobile/blank.php

@ -29,6 +29,7 @@ $url = 'https://api.weixin.qq.com/sns/oauth2/access_token?appid=' . $appid . '&s
$response = file_get_contents($url); $response = file_get_contents($url);
// echo $response; // echo $response;
$data = json_decode($response, true); $data = json_decode($response, true);
echo $data;
if (!$data || !isset($data['access_token']) || !isset($data['openid'])) { if (!$data || !isset($data['access_token']) || !isset($data['openid'])) {
// 授权失败 // 授权失败
echo '授权失败,请重试'; echo '授权失败,请重试';

Loading…
Cancel
Save