소스 검색

修改bug

chenbo 4 년 전
부모
커밋
325607ec2f
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      lib/common/weixin_public.class.php

+ 2 - 2
lib/common/weixin_public.class.php

@@ -47,8 +47,8 @@ class weixin_public
         $url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=".$this->appid
             ."&secret=".$this->seceret."&code=".$code."&grant_type=authorization_code";
 
-        return file_get_contents($url);
-        //return json_decode($jsonInfo, true); //接受一个 JSON 格式的字符串并且把它转换为 PHP 变量
+        $jsonInfo = file_get_contents($url);
+        return json_decode($jsonInfo, true); //接受一个 JSON 格式的字符串并且把它转换为 PHP 变量
     }
 
     public function getAllInfo($code)