中缺省的最长执行时间是 30 秒,这是由 中的 max_execution_time 变量指定.
PHP 程序中加入 ini_set('max_execution_time', '0'),数值 0 表示没有执行时间的限制,你的程序需要跑多久便跑多久。
<?php
// string(3) "100"
ini_set('max_execution_time',100);
$a=ini_get('max_execution_time');
var_dump($a);
<?php
ini_set("max_execution_time", 1);
for($i=1; $i< 100000; $i++)
{
echo "No. {$i}\n";
echo '<br />';
flush();
}