灏豳
zero_ll
L1230205
你应该经过了两次跳转,code码只能使用一次
慕无忌9426211
你的域名没备案,你用点继续访问之前,已经刷新了一次页面了,所以你点了,就又刷新了,所以会提示has used
_秦王_
也可以不调用$this->http_curl(); 直接用
file_get_contents($url);也可以
慕粉0142497203
index是个类名 这种单入口模式 http://www.examole.com/index.php/类名/方法名
慕粉4345383
确认APPID 和APPsecret 没错哦 把你 function getUserOpenId ()里面的 $url 的https前面的空格删掉 
乐运
用全局变量试试
qq_心安_3
function http_curl($url,$type='get',$res='json',$arr=''){
//1,初始化curl
$ch = curl_init();
//2,设置 curl的参数
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
if ($type == 'post') {
curl_setopt($ch, CURLOPT_POST, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $arr);
}
//3,采集
$output = curl_exec($ch);
//4,关闭
curl_close($ch);
if ($res == 'json') {
if ( curl_errno($ch) ) {
return curl_error($ch);
}else{
return json_decode($output,true);
}
}
}
FaiMan
我也是碰到同样的问题了