PHP 中跳转网页的三种方法

一:Header

Ex:  3秒后跳转到主页:header("Refresh: 3; url=index.php");

缺点:header 前不能有输出

二:利用 <meta> 标签:

Ex: 3秒后跳转到主页:<meta http-equiv="refresh"  content="3"; url="index.php">;

三:利用 js:

 Ex: echo "<script>window.location.href='http://blog.163.com/skill_sun/blog/index.php';</script>";

posted @ 2015-12-01 15:31  Sun丶老板  阅读(778)  评论(0编辑  收藏  举报