1、header实现页面跳转

header()函数是PHP中进行页面跳转的一种十分简单的方法。header()函数的主要功能是将HTTP协议标头(header)输出到浏览器。

<?php 
 //重定向浏览器 
header(\"Location: http://www.manongjc.com\"); 
 //确保重定向后,后续代码不会被执行 
exit;
?>

 

2、使用 实现页面跳转

echo \"<  type=\'text/ \'>window.location.href=\'www.abidu.com\'</ >\";  

 

3、使用HTML refresh实现跳转

<  http-equiv=\"refresh\" content=\"0\"; url=http://www.manongjc.com/\" />

这里的content属性表示几秒后执行跳转,比如:content=“5”表示5秒后执行跳转。

收藏 打印