网页跳转的多种方式
通用
Header函数

header("Location: http://www.guanwei.org"); exit;

header('Refresh:3,Url=other.php');die;
Meta标签

< meta http-equiv="refresh" content="1;url=http://www.guanwei.org">
Js跳转

$url = "http://www.guanwei.org";
echo "<script language='javascript' type='text/javascript'>";
echo "window.location.href='$url'";
echo "</script>";
TP中的跳转
成功和失败跳转

if($newid){
//成功
$this -> success('成功',U(),1);
}else{
//失败,给本身页面跳转
$this -> error('添加失败',U(),2);
}
重定向跳转

$this -> redirect('Index/index');
redirect方法的参数用法和U函数的用法一致

浙公网安备 33010602011771号