编程语言
首页 > 编程语言> > thinkphp3.2 控制器页面跳转和重定向

thinkphp3.2 控制器页面跳转和重定向

作者:互联网

    public function index(){
        $this->success('Yes',U('Home/User/index'));//成功跳转
        $this->error('error',U('Home/User/index'));//失败

         //直接重定向跳转(3秒后跳转到指定路径)
         redirect(U('Home/User/index'), 3, '页面跳转中...'); //使用大U
         redirect('/Home/User/index', 3, '页面跳转中...');
         redirect('http://baidu.com', 3, '页面跳转中...');

    }

 

标签:redirect,index,thinkphp3.2,User,跳转,Home,页面
来源: https://www.cnblogs.com/dazahui/p/14400202.html