Home > php教程 > php手册 > PHP页面定时跳转实现方法

PHP页面定时跳转实现方法

WBOY
Release: 2016-05-25 16:44:53
Original
728 people have browsed it

php定时跳转我们需要利用header函数输入html或js代码来实现定时跳转了,下面我来介绍一个简单的例子

php代码

header("refresh:3;url=http://www.phprm.com");
print(&#39;正在加载,请稍等...<br>三秒后自动跳转到php入门网哦~~~&#39;);
Copy after login

输出的html代码就是

一样的效果。

这样就实现了3秒之后自动跳转到http://www.phprm.com了哦

友情提示,如果你文件是uft-8编码的话我们要注意不要在header前有输出或BOM字符哦,这可会导致无法跳转。


教程网址:

欢迎收藏∩_∩但请保留本文链接。

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template