Home > Backend Development > PHP Tutorial > PHP update database interruption solution_PHP tutorial

PHP update database interruption solution_PHP tutorial

WBOY
Release: 2016-07-21 15:46:01
Original
1176 people have browsed it

This can be solved:
set_time_limit(900);
This function specifies the maximum execution time of the current php script.
Although the setting value is 900 seconds, in fact
the maximum execution time = php. The max_execution_time value in ini - the time the current script has been executed + the setting value
If max_execution_time in php.ini = 30 and the current script has been executed for 10 seconds, then:
Maximum execution time = 30-10+900 =920 seconds.
After such modification, the PHP script successfully updated 200,000 records.

The above is passed in the LAPP environment.
In addition, it is said that this method is invalid in the windows environment. In the windows environment, you need to specify the max_execution_time value in php.ini.
This scenario has not been tested.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/320258.htmlTechArticle can be solved: set_time_limit(900); This function specifies the maximum execution time of the current php script. Although set The fixed value is 900 seconds. The actual maximum execution time = max_ex in php.ini...
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