Home > Backend Development > PHP Tutorial > curl post报错问题

curl post报错问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-23 13:44:35
Original
1700 people have browsed it

 curl_setopt() expects parameter 2 to be long 是什么错误??

  

//初始化curl       	$ch = curl_init();		//设置超时		curl_setopt($ch, CURLOP_TIMEOUT, $this->curl_timeout);		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);
Copy after login


回复讨论(解决方案)

哪行报错??

curl_setopt($ch, CURLOP_TIMEOUT, $this->curl_timeout);
改成
curl_setopt($ch, CURLO P_TIMEOUT, $this->curl_timeout);

看错了,改成这样
curl_setopt($ch, CURLOP T_TIMEOUT, $this->curl_timeout);

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template