What is the way to make php time out?

爱喝马黛茶的安东尼
Release: 2023-02-23 11:08:02
Original
2750 people have browsed it

What is the way to make php time out?

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);
Copy after login

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);
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!