我正在从在线来源下载JSON文件,当它在循环中运行时,出现此错误: php
致命错误:第24行的C:\\ wamp \\ www \\ temp \\ fetch.php中超过30秒的最大执行时间 编辑器
我遇到了一样的问题,并经过更改php.ini
的参数max_execution_time
的值来解决它,以下所示: ide
max_execution_time = 360 ; Maximum execution time of each script, in seconds (I CHANGED THIS VALUE) max_input_time = 120 ; Maximum amount of time each script may spend parsing request data ;max_input_nesting_level = 64 ; Maximum input variable nesting level memory_limit = 128M ; Maximum amount of memory a script may consume (128MB by default)
但愿对您有所帮助。 fetch
你能够用whm轻松地作到这一点。 Jusst开始使用whm ----->服务配置---------> php配置编辑器------- max_execution_time -----> 30(默认将其更改成任何值你想) this
也许检查php.ini文件下是否有任何更改。 to in order to enable the "Internationalization extension (Intl)" without adding the then this same error occurred. 例如,为了将更改成 ,以便在不添加状况下启用“国际化扩展名(Intl)”,而后发生了相同的错误。 因此我建议检查相似的错误。 spa
以上全部答案都是正确的,可是在某些状况下,我使用一种简单的方法来避免这种状况。 code
只需将如下命令放在脚本开头便可: ip
set_time_limit(0);
编辑php.ini input
找到这一行: it
max_execution_time
将其值更改成300:
max_execution_time = 300
300表示http请求的执行时间为5分钟。