php实现弹出新页面的方法:1、使用“header("Location:".PSYS_BASE_URL."user/index");”方法实现弹出跳转;2、通过“header("refresh:3;url='createTag' ");”。

推荐:《PHP视频教程》
PHP实现弹出提示框并跳转到新页面
PHP实现弹出提示框后返回上一个页面
alert('退出成功!');location.href='".$_SERVER["HTTP_REFERER"]."';";
?>alert里面是提示的消息,href是提示后跳转的页面。
立即学习“PHP免费学习笔记(深入)”;
如果alert中文乱码,加入下面代码
echo '';
我们可以考虑封装成函数来调用,下面是我自己封装的页面跳转函数
/**
* 页面跳转方法
* @param $msg 提示说明
* @param null $path 跳转路径
* @param null $parent 为ture则返回父窗口
*/
function messageInfo($msg,$path=NULL,$parent=NULL){
if($parent === true){
$str="";
}else if(empty($path)){
$str="";
}else{
$str="";
}
echo '';//支持中文
echo $str;
}使用方法:messageInfo(‘操作成功!’,’http://www.demourl.com/product_list.php’);
其他跳转方法
代码如下:
echo ""; echo "";
$url就是要跳转的页面,同时,这个还能控制跳转时间,content后面的0就是表示0秒后跳转。
两个直接跳转的方式:
代码如下:
header("Location:".PSYS_BASE_URL."user/index");代码如下:
// echo "";
// header("refresh:3;url='createTag' ");











