教程集 www.jiaochengji.com
教程集 >  脚本编程  >  php  >  正文 PHP页面定时跳转实现方法

PHP页面定时跳转实现方法

发布时间:2016-12-03   编辑:jiaochengji.com
教程集为您提供PHP页面定时跳转实现方法等资源,欢迎您收藏本站,我们将为您提供最新的PHP页面定时跳转实现方法资源
php定时跳转我们需要利用header函数输入html或js代码来实现定时跳转了,下面我来介绍一个简单的例子

php代码

<table width="620" align="center" border="0" cellpadding="1" cellspacing="1" style="background:#FB7"> <tr> <td width="464" height="27" bgcolor="#FFE7CE"> 代码如下</td> <td width="109" align="center" bgcolor="#FFE7CE" style="cursor:pointer;" onclick="doCopy('copy4821')">复制代码</td> </tr> <tr> <td height="auto" colspan="2" valign="top" bgcolor="#FFFFFF" style="padding:10px;" class="copyclass" id=copy4821>

header("refresh:3;url=http://www.jiaochengji.com");
print('正在加载,请稍等...<br>三秒后自动跳转到一聚教程网哦~~~');

输出的html代码就是

<meta http-equiv="refresh" content="3; url=http://www.jiaochengji.com">一样的效果。

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

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

您可能感兴趣的文章:
php如何实现页面跳转
php url重定向(页面跳转)的代码
php页面跳转函数 页面重定向
PHP 登录完成跳转上一访问页面
php页面跳转与定时跳转页面方法
PHP实现301跳转,及延时跳转代码
PHP页面跳转的三种方法
js 控制页面跳转的五种方法
PHP页面跳转的几种方式
PHP页面定时跳转实现方法

[关闭]
~ ~