您的位置:首页 > 编程语言 > PHP开发

PHP页面跳转到3种方法

2012-03-28 21:43 274 查看
php页面跳转到3种方法:


第一种,使用php的header函数

header("location: http://www.phpcode8.com/index.php“); //页面跳转到phpcode8首页


第二种,使用javascript window.location

$location="http://www.phpcode8.com";
echo " <script> window.location.href=$location </script> ";



第三种, 使用html refresh

$location = "http://www.phpcode8.com";
echo "<meta http-equiv='refresh' content='0;url=$location' />";
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: