3 ways to set php timeout:
The first way is to open the php.ini file, find max_execution_time, and change the following numbers. into the time you want, in seconds.
After modification in this way, the service needs to be restarted. This method is generally not recommended.
Related recommendations: "PHP Tutorial"
Second, use PHP's ini_set() function setting, setting method:
ini_set("max_execution_time",1800);
The setting statement must be the first line of the php file.
The third method is to use PHP's set_time_limit() function to set it. Setting method:
set_time_limit(1800);
The setting statement must be the first line of the PHP file.
The above is the detailed content of What is the way to make php time out?. For more information, please follow other related articles on the PHP Chinese website!