php跳转重定向三个方法!

分类:php

 PHP重定向三种方法::
(1).如果要用此方法,在用之前不能有HTML输出。(***)

$url="http://www.endbus.cn";
header("Location: $url");


(2).

echo "<script>window.location ="www.endbus.cn";</script>";



将window.location换成self.location
(3).

echo "<META HTTP-EQUIV="Refresh" CONTENT="0; URL=index.php">";

 

本文链接: php跳转重定向三个方法!
版权所有:布士收藏夹在网络收集,如有侵犯你的权利, 请联系QQ:641868752。

评论

发表评论

*

* (显示gravatar头像)

Ctrl+Enter快捷回复

© 2014 布士收藏夹 all rights reserved.