0
這很怪,php curl下載一直停在95%。這讓我瘋狂。php curl下載站95%
這裏是我使用沒有什麼花哨
$fp = fopen($file, 'w');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.domain.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_HTTPHEADER,array("ETag: $rddash"));
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_exec($ch);
curl_close($ch);
fclose($fp);
東西我注意到,遠程網站使用的Etag的代碼,所以我用它,但仍然沒有工作。
下載在完成之前停止的原因是什麼?
任何超時問題? – Pentium10 2012-07-08 17:24:51
你檢查了PHP錯誤日誌嗎?文件有多大/你有多少磁盤空間? – 2012-07-08 17:36:49