How to redirect users to another page?

后端 未结 4 1076
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-20 23:17

I need to redirect users that visit a certain page without providing specific parameters in a query string. How to redirect users to another page the right way? So that the sear

4条回答
  •  耶瑟儿~
    2021-01-21 00:14

    if($condition){
     header('Location: http://example.com');
     exit();
    }
    

    will do it. Don't forget the exit()!

提交回复
热议问题