Home > Backend Development > PHP Tutorial > Maximum execution time of 30 seconds exceeded_PHP tutorial

Maximum execution time of 30 seconds exceeded_PHP tutorial

WBOY
Release: 2016-07-13 17:49:29
Original
852 people have browsed it

Maximum execution time of 30 seconds exceeded error solution.

A brief summary of the solution:

Error 1: The memory exceeds the limit. I forgot the specific error statement. Please briefly explain the solution.

Use loop to import in batches;
Use the sleep(5); statement at the beginning of each loop to delay execution to prevent the server memory from occupying too much at the same time and modify the data inside;
At the end of each loop, ob_flush(); is used to refresh the output buffer
flush(); Send all the output of the program so far to the user’s browser
Both must be used at the same time to flush the output buffer www.2cto.com

Error 2: Maximum execution time of 30 seconds exceeded error (Maximum execution time of 30 seconds exceeded)

Solution:

Method 1, modify the php.ini file

max_execution_time = 30; Maximum execution time of each script, in seconds
Just set it to the required value. If set to 0, it will never expire.
Method two, modify the php execution file
Add
set_time_limit(0);
?>

max_execution_time = 30; Maximum execution time of each script, in seconds
Just set it to the required value. If set to 0, it will never expire.

Excerpted from Shunzi Network PHP website construction

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478350.htmlTechArticleMaximum execution time of 30 seconds exceeded error solution. Briefly summarize the solution: Error 1: Memory exceeded, I forgot the specific error statement, so I will briefly explain the solution. ...
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