Set_time_limit favorites
Syntax: void set_time_limit (int seconds)
Note:
Set the number of seconds that a program can run. If the time limit is reached, the program will return an error. The default limit time is 30 seconds. The value of max_execution_time is defined in the structure file (php3.ini in PHP3 and php in PHP4. ini). If the number of seconds is set to 0, there is no time limit.
When you call this function, set_time_limit () calculates the maximum execution time from scratch. That is, if the maximum execution time is 30 seconds, however, if it takes 25 seconds to execute the program before calling set_time_limit (20), the maximum program execution time will be 45 seconds.
Note: When PHP is executed in safe mode, set_time_limit () will not produce any results, unless it is disabled in safe mode or modified in the structure file (in PHP3, it is called php3.ini, PHP4 is called php. ini.
Example:
Set_time_limit (1000)