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.