我怎样才能设置一个PHP脚本的最大执行时间? [英] How can I set the maximum execution time for a PHP script?
本文介绍了我怎样才能设置一个PHP脚本的最大执行时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想改变最大的执行时间为一个PHP脚本。在剧本我都试过
I would like to change the maximum execution time for a PHP script. In the script I have tried
ini_set("max_execution_time", "1000");
和
set_time_limit(1000);
在一起,分开。
我还添加了此行的.htaccess:
I also added this line to .htaccess:
php_value max_execution_time 1000
php.ini中具有安全模式关闭,Apache服务器有标志的AllowOverride全部
。我必须做什么来获得服务器允许更长的执行时间?
php.ini has safemode off and the Apache server has the flag AllowOverride All
. What must I do to get the server to allow a longer execution time?
推荐答案
如果你正在寻找一个Apache2的指令性在.htaccess或者一个虚拟主机的配置中使用,你可能需要php_admin_value:
If you're looking for an Apache2-directive to use in .htaccess or the configuration of one VirtualHost, you probably need php_admin_value:
php_admin_value max_execution_time 1000
AFAIK这仅适用于mod_php的
AFAIK this only works with mod_php
这篇关于我怎样才能设置一个PHP脚本的最大执行时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文