mk_*_*_89 8 php time web-crawler
我已经尝试了一切来改变max_execution_timePHP爬虫脚本,以便它可以运行无限的时间.
我已将php.ini文件设置更改max_execution_time为0或100000000但没有更改
我也尝试过使用PHP脚本本身设置它 ini_set('max_execution_time', 0);
所有的PHP脚本都会抛出相同的错误Fatal error: Maximum execution time of 3000 seconds exceeded,我可能会错过什么,如何确保没有最大执行时间限制?
PHP脚本
<?php
ini_set('MAX_EXECUTION_TIME', -1);
error_reporting(E_ALL); // turn on all errors, warnings and notices for easier debugging
//ini_set('max_execution_time', 123456);
ini_set('max_input_time', -1);
ini_set('memory_limit', '512M');
set_time_limit(0);
date_default_timezone_set('Europe/London');
/*code which scrapes websites*/
?>
Run Code Online (Sandbox Code Playgroud)
phpinfo()函数
max_execution_time 0 0
max_input_time -1 -1
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
22605 次 |
| 最近记录: |