ini_set, set_time_limit, (max_execution_time) - not working

后端 未结 3 1961
面向向阳花
面向向阳花 2020-11-28 16:08

If I do set_time_limit(50) or ini_set(\'max_execution_time\',50), then when I echo ini_get(\'max_execution_time\') on my localhost i g

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-28 16:13

    You can not change this setting with ini_set() when running in safe mode. The only workaround is to turn off safe mode or by changing the time limit in the php.ini.

    -- PHP manual, Runtime Configuration, description of max_execution_time

    Many hosts run in safe mode. The other server is most likely one of them.

    Edit: The same restriction is in place on set_time_limit:

    This function has no effect when PHP is running in safe mode. There is no workaround other than turning off safe mode or changing the time limit in the php.ini.

    -- PHP manual, set_time_limit page

提交回复
热议问题