Home  >  Article  >  Backend Development  >  PHP execution timeout setting

PHP execution timeout setting

Guanhui
GuanhuiOriginal
2020-05-08 15:02:534991browse

PHP execution timeout setting

php execution timeout setting

1. Find the "max_execution_time" configuration item in the php.ini file and modify the corresponding value. ;

Open the php.ini file and find:

max_execution_time=30

Change it to:

max_execution_time=600

2. Use the PHP built-in function "ini_set" to modify the "max_execution_time" configuration item ;

<?php
ini_set(&#39;max_execution_time&#39;, 600);//秒为单位,自己根据需要定义


The above is the detailed content of PHP execution timeout setting. 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