作者:手机用户2502910463 | 来源:互联网 | 2018-03-11 01:34
1 利用js 实现
代码如下:
if(!$this->userInfo){
$alert_msg = "激活链接错误";
echo"alert('$alert_msg');window.location='$redirect_url';《SCRIPT》";
//redirect(base_url());
die;
}
2 php 实现
代码如下:
if(!$this->userInfo){
$alert_msg = "激活链接错误";
echo"alert('$alert_msg');《SCRIPT》";//这种方式没有弹窗效果 why? 加上exit 会有弹窗,后续也会重定向;
redirect(base_url());
die;
}