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