yii2超过了120秒的最大执行时间

Mal*_*med 14 php execution-time yii2

我上传了一个包含1000行的excel文件,默认情况下我只有2分钟的执行时间,那时我可以上传400条记录.我收到这个错误Maximum execution time of 120 seconds exceeded

我如何在yii2框架中修改这段时间?

sca*_*dge 25

你需要在php.ini中改变它:

max_execution_time = 500
Run Code Online (Sandbox Code Playgroud)

或者在你的php脚本中:

set_time_limit(500); // 
Run Code Online (Sandbox Code Playgroud)