我收到错误致命错误:超过30秒的最大执行时间
这很奇怪,因为我将超时设置为0。
function curl(){
$this->options = Array(
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_FOLLOWLOCATION => FALSE,
CURLOPT_CONNECTTIMEOUT => 0,
CURLOPT_TIMEOUT => 0,
CURLOPT_MAXREDIRS => 20,
CURLOPT_USERAGENT => random_user_agent(),
CURLOPT_URL => $this->url,
);
$this->ch = curl_init(); //Initalising curl;
curl_setopt_array($this->ch, $this->options);
$this->data = curl_exec($this->ch); // Executing cURL;
curl_close($this->ch);
return $this->data;
}
Run Code Online (Sandbox Code Playgroud)
有谁知道可能是什么问题?
非常感谢您的任何答复。
| 归档时间: |
|
| 查看次数: |
1772 次 |
| 最近记录: |