PHP/codeigniter - use of exit()

前端 未结 8 1013
不思量自难忘°
不思量自难忘° 2020-12-28 16:46

I have a few pages that require login, so all controllers that link to these pages start with

$this->checkSession();
//...rest of the code
8条回答
  •  一整个雨季
    2020-12-28 17:20

    In this case you should not use exit, what you should do if the session is not valid is redirect your app using example:

    redirect('/init/login/','refresh');
    

提交回复
热议问题