Home  >  Article  >  Backend Development  >  How to set timeout in php.ini

How to set timeout in php.ini

藏色散人
藏色散人Original
2020-08-06 09:50:083089browse

How to set the timeout in php.ini: 1. Set the content in "php.ini" to "max_execution_time = 1800;"; 2. Add the content to the beginning of the php document as "set_time_limit(100)," Represents a timeout of 100 seconds.

How to set timeout in php.ini

Recommended: "PHP Video Tutorial"

Set php.ini Script timeout method

There are two ways to set php.ini script timeout:

Method 1: Set max_execution_time = 1800 in php.ini;

Currently above The method can use ini_set("option", "value"), ini_set(''max_execution_time'',''180'');

Method 2: Use set_time_limit() in the php page, such as in php Add set_time_limit(100) at the beginning of the document, which means a timeout of 100 seconds.

The above is the detailed content of How to set timeout in php.ini. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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