gpt4 book ai didi

php - ini_set, set_time_limit, (max_execution_time) - 不工作

转载 作者:IT老高 更新时间:2023-10-29 00:11:57 26 4
gpt4 key购买 nike

如果我执行 set_time_limit(50)ini_set('max_execution_time',50),那么当我回显 ini_get('max_execution_time') 在我的本地主机上,我得到 50,但是当我在另一台服务器上执行此操作时,它会回显默认的 30 并完全忽略我的请求。这是为什么呢?

最佳答案

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 手册,运行时配置,description of max_execution_time

许多主机在安全模式下运行。另一台服务器很可能就是其中之一。

编辑: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 手册,set_time_limit页面

关于php - ini_set, set_time_limit, (max_execution_time) - 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1590441/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com