[英]How can I override the php.ini value of max_execution_time at runtime?
I don't have acess to php.ini
in my server. 我的服务器中没有访问
php.ini
。 I want to change the maximum execution time so that my script can runs for more than 30 seconds. 我想更改最长执行时间,以便我的脚本可以运行超过30秒。
is there any way i can do that on the start of my script? 我有什么方法可以在我的剧本开头做到这一点?
use ini_set
使用
ini_set
ini_set('max_execution_time', 300); // this will set max_execution time for 300 seconds
write this line at start of your code in php file. 在php文件中的代码开头写这行。
OR 要么
use this by Hanky Panky ㇱ 用这个来自HankyPankyㇱ
set_time_limit(300);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.