PHP sets the maximum execution time of code

怪我咯
Release: 2023-03-10 19:00:01
Original
2778 people have browsed it

phpWhen certain operations are completed, it may take a long time to execute. This requires setting its execution time, otherwise the server will stop execution after the execution time times out and the page will be blank. Two solutions are recommended below:

1.php file page settings:

ini_set('max_execution_time', '0'); //修改此次最大运行内存 ini_set('memory_limit','128M'); /*** * * 代码块省略...... * * */ ?>
Copy after login

php.iniConfiguration filesettings (specific values, set as needed):

max_execution_time = 60

memory_limit = 128M

PHP sets the maximum execution time of code

PHP sets the maximum execution time of code

##Note: If the execution memory is completely satisfied, then No need to set it up. Specific settings can be set flexibly according to the situation.

The above is the detailed content of PHP sets the maximum execution time of code. 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
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!