控制php页面跳转的
1 页面跳转在当前页设置刷新
无标题文档2 重定向跳转.php
if(isset($url))
{
header("HTTP/1.1 303 see other");
header("location: $url"); exit;
}
?>
3 脚本实现控制跳转
$url="http://www.csdn.net";
echo "
echo "location.href='$url'";
echo "";
?>
4 补充方法
cho "< meta http-equiv=\\"Refresh\\" content=\\"秒数; url=跳转的文件或地址\\" > "; 其中:XX是秒数,0为立即跳转.refresh 是刷新的意思.Url 是要跳转到的页面.
5 script实现方式
6 利用script实现,所不同的是使用 open 语句.且可以限制原窗口还是父窗口,子窗口或者新窗口.
$url="http://www.csdn.net";
echo "
echo "window.open('$url',3,'_bank')";
echo "";
?>
其中 更改\'_self\' 就可以实现跳转限制原窗口还是父窗口,子窗口或者新窗口
7 利用php自带函数发送头部信息
header("Location: Url");