(PHP 4, PHP 5)
Set_time_limit-set the maximum script execution time
Description void
Set_time_limit(Int
$seconds
)
Set the time allowed for script running, in seconds. If this setting is exceeded, the script returns a fatal error. The default value is 30 seconds.Php. iniOfMax_execution_timeThe defined value if it exists.
When this function is called,Set_time_limit ()The timeout counter is restarted from scratch. In other words, if the timeout value is 30 seconds by default, and 25 seconds are set in the script, as shown in figureSet_time_limit (20). The total running time of the script before the timeout is 45 seconds.
Parameters
-
seconds
-
The maximum execution time, in seconds. If it is set to 0 (zero), there is no time limit.
Return Value
No return value.
Note
This function does not take effect. Except for disabling or changing the Security ModePhp. iniThere is no other way.
Note:
Set_time_limit ()The function and configuration command max_execution_time only affect the execution time of the script. The maximum time for executing any script that occurs in a system call, stream operation, or database operation that uses system () is not included when the script has been run. This is not the case in Windows where the measurement time is real.