php yii2 超过 120 秒的最大执行时间
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37123111/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Maximum execution time of 120 seconds exceeded in yii2
提问by Malki Mohamed
I upload an excel file with 1000 rows, by default I have just 2 min in execution time, with that time I can upload 400 records.
I get this error Maximum execution time of 120 seconds exceeded
我上传了一个包含 1000 行的 excel 文件,默认情况下我只有 2 分钟的执行时间,到那时我可以上传 400 条记录。我收到这个错误Maximum execution time of 120 seconds exceeded
How i can modify this period in yii2 framework ?
我如何在 yii2 框架中修改这段时间?
回答by scaisEdge
You need to change that in the php.ini:
您需要在 php.ini 中更改它:
max_execution_time = 500
or in your php script:
或在您的 php 脚本中:
set_time_limit(500); //