ini_set, set_time_limit, (max_execution_time) - not working

后端 未结 3 1957
面向向阳花
面向向阳花 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条回答
  •  一向
    一向 (楼主)
    2020-11-28 16:23

    Does GoDaddy allow you to edit their remote PHP.INI file, or (achieving the same function) set those options at runtime? Many restrictive hosts (and I don't know this about GoDaddy one way or the other) won't let you futz with PHP options either via the config file or at runtime as you did on WAMP. It could be that though you're still calling that function, it's not being applied.

    Use

    echo 'Time Limit = ' . ini_get('max_execution_time') .
    

    The manual says that if it's set at all in the PHP.INI, that will override this runtime. PHP Manual on set_time_limit

提交回复
热议问题