set_time_limit($seconds)
If
$second is set to 0, no time limit is imposed. Note that you should be cautious with removing the time limit altogether. You don't want any infinite loops slowly eating up all server resources. A high limit, e.g. 180 is better than no limit.
Alternatively, you can adjust the time setting just for certain functions and resetting the time limit after the time critical code has run, e.g.
$default = ini_get('max_execution_time');
set_time_limit(1000);
... some long running code here ...
set_time_limit($default);
or
In .htaccess you can set these values:
php_value max_execution_time 1000000
php_value max_input_time 1000000
No comments:
Post a Comment