Home >Backend Development >PHP Tutorial >Solution to php setting page timeout, php timeout_PHP tutorial

Solution to php setting page timeout, php timeout_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-12 09:08:07906browse

Solution to php setting page timeout, php timeout

Sometimes my page will keep redirecting due to network card. I wonder if I can set a timeout for the page. If there is no response for a long time, it will prompt a timeout

For example, set_time_limit(300) in php

I don’t think PHP pages also have a timeout mechanism

------Solution Idea----------------------

Isn’t there set_time_limit() in php? You can also set max_execution_time in php.ini to change the global timeout.

------Solution Idea----------------------

max_execution_time

------Solution Idea----------------------

set_time_limit(300)

The card has been stuck for 5 minutes, it’s a bit big. Unless you are executing a large number of programs.

------Solution Idea----------------------

ini_set('max_execution_time', '0'), a value of 0 means there is no execution time limit.

It is recommended not to exceed 30 seconds.

The above content is very brief. It easily solves the problem of setting the page timeout in PHP. I hope this article will be helpful to everyone.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1057469.htmlTechArticlephp setting page timeout solution, php timeout sometimes my page will keep redirecting due to network card, I I wonder if I can set a timeout for the page. If there is no response after a long time, I will raise it...
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