Home >Backend Development >PHP Problem >How to automatically jump to web pages in php at regular intervals

How to automatically jump to web pages in php at regular intervals

coldplay.xixi
coldplay.xixiOriginal
2021-03-03 17:35:212154browse

How to automatically jump to web pages in php at regular intervals: Use the header function to enter html or js code to achieve regular jumps. The code is [header("refresh:3;url=https://www.php.cn /");].

How to automatically jump to web pages in php at regular intervals

The operating environment of this tutorial: Windows 7 system, PHP version 5.6, DELL G3 computer.

php method to automatically jump to web pages at regular intervals:

php scheduled jump We need to use the header function to enter html or js code to achieve scheduled jumps, let me do it below Introducing a simple example

php code is as follows:

code is as follows:

header("refresh:3;url=https://www.php.cn/");

print('Loading, please wait...0c6dc11e160d3b678d68754cc175188aThree seconds later Automatically jump to the PHP Chinese website~~~');

The output html code is

The code is as follows:

<meta http-equiv="refresh" content="3; url=https://www.php.cn/">

The same effect.

Related video recommendations: PHP video tutorial

The above is the detailed content of How to automatically jump to web pages in php at regular intervals. 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