我使用 curl 从页面获取数据
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $page);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
$str = curl_exec($curl);
curl_close($curl);
$raw= str_get_html($str);
$page
页面的网址在哪里
它工作得很好但是当我尝试从大于正常的页面获取数据时,我的 apache 停止响应
这是apache日志:
[Sat Sep 15 10:17:36 2012] [notice] Apache/2.2.21 (Win32) PHP/5.3.9 configured -- resuming normal operations
[Sat Sep 15 10:17:36 2012] [notice] Server built: Sep 10 2011 11:34:11
[Sat Sep 15 10:17:36 2012] [notice] Parent: Created child process 3908
[Sat Sep 15 10:17:36 2012] [notice] Child 3908: Child process is running
[Sat Sep 15 10:17:36 2012] [notice] Child 3908: Acquired the start mutex.
[Sat Sep 15 10:17:36 2012] [notice] Child 3908: Starting 64 worker threads.
[Sat Sep 15 10:17:36 2012] [notice] Child 3908: Starting thread to listen on port 8080.
[Sat Sep 15 10:17:53 2012] [notice] Parent: child process exited with status 3221225477 -- Restarting.
我认为页面大小是一个问题(不确定),有人可以确认吗?有没有办法解决这个问题?我试图在 php.ini 中增加 memory_alocation 但它没有帮助