开发者

Unknown Curl error

开发者 https://www.devze.com 2022-12-24 18:03 出处:网络
I got a small problem getting an unknown curl error from my script curl_error(): 180 is not a valid cURL handle resource开发者_开发百科

I got a small problem getting an unknown curl error from my script

curl_error(): 180 is not a valid cURL handle resource开发者_开发百科

Here's the part which causes the error and exact log: PHP Warning: curl_error(): 180 is not a valid cURL handle resource on

if(curl_error($ch))  
{  
    curl_close($ch);  
    $resp = curl_error($ch); // That's the line causing the error  
    error_log(date('Y M D h:s:m '). ":  $current error:  "  .curl_error($ch)."\n", 3, '../../usererrors/'.$username.'errors');  
    return $resp;  
}


I must admit that the error was caused by calling curl_close before curl_error. So case closed hope someone got some help from this as well :)

0

精彩评论

暂无评论...
验证码 换一张
取 消