Home  >  Article  >  Backend Development  >  How to implement scheduled page jump in php

How to implement scheduled page jump in php

怪我咯
怪我咯Original
2017-07-06 10:35:452495browse

This article mainly introduces the method of implementing scheduled jumps on PHP pages. Example demonstrationUsing headerfunction to implement jump techniques requires Friends can refer to

. This article describes the method of implementing scheduled jumps on PHP pages and shares it with you for your reference. The specific implementation method is as follows:

php timing jump We need to use the header function to enter html or js code to achieve timing jump. Let me introduce a simple example

php code is as follows:

The code is as follows:

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

print('Loading, please wait...0c6dc11e160d3b678d68754cc175188a Automatically jump to after three seconds PHP Chinese website~~~');

The output html code is

The code is as follows:

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

The same effect.
This will automatically jump to http://www.php.cn after 3 seconds.

What needs to be noted here is: if your file is uft-8 encoded, we must be careful not to have output or BOM characters before the header, which may cause the jump to fail.

The above is the detailed content of How to implement scheduled page jump in php. 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