您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

PHP 微信开发 支付失败 curl_setopt()

2024/4/15 6:35:05发布10次查看
php warning: curl_setopt() expects parameter 2 to be long, string given in e:\wwwroot\pay3\wxpaypubhelper\wxpaypubhelper.php on line 821

/** * 作用:通过curl向微信提交code,以获取openid */ function getopenid() { $url = $this->createoauthurlforopenid(); //初始化curl $ch = curl_init(); //设置超时 curl_setopt($ch, curlop_timeout, $this->curl_timeout); 821行代码 echo $this->curl_timeout; exit; curl_setopt($ch, curlopt_url, $url); curl_setopt($ch,curlopt_ssl_verifypeer,false); curl_setopt($ch,curlopt_ssl_verifyhost,false); curl_setopt($ch, curlopt_header, false); curl_setopt($ch, curlopt_returntransfer, true); //运行curl,结果以jason形式返回 $res = curl_exec($ch); curl_close($ch); //取出openid $data = json_decode($res,true); $this->openid = $data['openid']; return $this->openid; }

回复内容: php warning: curl_setopt() expects parameter 2 to be long, string given in e:\wwwroot\pay3\wxpaypubhelper\wxpaypubhelper.php on line 821

/** * 作用:通过curl向微信提交code,以获取openid */ function getopenid() { $url = $this->createoauthurlforopenid(); //初始化curl $ch = curl_init(); //设置超时 curl_setopt($ch, curlop_timeout, $this->curl_timeout); 821行代码 echo $this->curl_timeout; exit; curl_setopt($ch, curlopt_url, $url); curl_setopt($ch,curlopt_ssl_verifypeer,false); curl_setopt($ch,curlopt_ssl_verifyhost,false); curl_setopt($ch, curlopt_header, false); curl_setopt($ch, curlopt_returntransfer, true); //运行curl,结果以jason形式返回 $res = curl_exec($ch); curl_close($ch); //取出openid $data = json_decode($res,true); $this->openid = $data['openid']; return $this->openid; }

curl_setopt($ch, curlopt_timeout, $this->curl_timeout); 821行代码 //字母写错了
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product