Set max_execution_time for specific controller in symfony2

前端 未结 1 943
一生所求
一生所求 2021-02-07 12:22

Using ini_set(), I can expand the maximum execution time of a script. In Symfony2, I can add ini_set to web/app.php

相关标签:
1条回答
  • 2021-02-07 13:06

    You can disable the PHP timeout limit with the set_time_limit function. More info here

    as Example:

    class TaskController extends Controller
    {
    
        public function longTaskAction()
        {
            set_time_limit(0); // 0 = no limits
            // ..
        }
    }
    

    Hope this help

    0 讨论(0)
提交回复
热议问题