curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$output = curl_exec($ch);
curl_close($ch);
if(curl_errno($ch)){
dump(curl_error($ch));
}
$arr = json_decode($output , true);
return $arr;//access_token:
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$output = curl_exec($ch);
curl_close($ch);
if(curl_errno($ch)){
dump(curl_error($ch));
}
$arr = json_decode($output , true);
return $arr;//access_token:
2016-09-02
//获取accesstoken
public function getWxAccessToken(){
//1.请求url地址
$appid = C('APPID');
$appsecret = C('APPSECRET');
$url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=".$appid."&secret="."$appsecret";
$ch = curl_init();
public function getWxAccessToken(){
//1.请求url地址
$appid = C('APPID');
$appsecret = C('APPSECRET');
$url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=".$appid."&secret="."$appsecret";
$ch = curl_init();
2016-09-02
public function curl($url){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$res= curl_exec($curl);
curl_close($curl);
return $res;
}
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$res= curl_exec($curl);
curl_close($curl);
return $res;
}
2016-08-31
已采纳回答 / coder_yang
该错误信息表示php当时编译时使用的curl库不支持https, 验证方法为 你的curl安装目录/bin/curl -V 或curl -V,重新安装一次试试
2016-08-26