Home > Backend Development > PHP Problem > How to set the maximum execution time of php in iis7

How to set the maximum execution time of php in iis7

藏色散人
Release: 2023-03-12 13:44:02
Original
2100 people have browsed it

iis7 Method to set the maximum execution time of PHP: 1. Set "max_execution_time=120;" in php.ini; 2. Set the time parameters through PHP's ini_set function; 3. Set the time parameters through the set_time_limit function.

How to set the maximum execution time of php in iis7

The operating environment of this article: Windows7 system, PHP7.1 version, DELL G3 computer

How to set the maximum execution time of php in iis7?

PHP Modify the maximum execution time and maximum memory limit of the script

Three methods for PHP to set the maximum execution time of the script

1. Set

max_execution_time = 120;
Copy after login

in php.ini 2. Set through PHP's ini_set function

ini_set("max_execution_time", "120");
Copy after login

3. Set through set_time_limit function

set_time_limit(120);
Copy after login

If the above numbers are set to 0, there will be no limit. , the script will continue to execute.

Three ways to set the maximum memory limit of scripts in PHP

1. Set it in php.ini

memory_limit = 128M ;
Copy after login

2. Set it through PHP's ini_set function

ini_set('memory_limit', '128M');
Copy after login

3. Modify Apache’s .htaccess file

Note: This method only takes effect when php is executed with the Apache module.

Find the ".htaccess" file in the root directory of your website. If not, you can create one yourself.

Then put the following configuration into it:

php_value memory_limit 128M ;
Copy after login

Recommended learning: "PHP Video Tutorial"

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

Related labels:
php
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