Home  >  Article  >  Backend Development  >  How to set the maximum execution expiration time of the page in PHP

How to set the maximum execution expiration time of the page in PHP

WBOY
WBOYOriginal
2016-07-25 08:50:421417browse
Generally, when uploading larger attachments, an error page indicating that the web page has expired will appear after more than 30 seconds. How to deal with this problem? The following is the processing method:

1. If it is your own server, you can configure it globally: set it in php.ini, the default is 30 seconds

max_execution_time = 30

2. Virtual host, and the server allows the use of the ini_set() function , can be set in the php code:

ini_set('max_execution_time',864000);
  1. //Set in php.ini, such as 30 seconds
  2. max_execution_time = 30
Copy code
  1. //Virtual host, and the server allows the use of the ini_set() function, which can be set in the PHP code:
  2. ini_set('max_execution_time',864000);
Copy code


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
Previous article:php get current URLNext article:php get current URL