PHP/codeigniter - use of exit()

前端 未结 8 1011
不思量自难忘°
不思量自难忘° 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:02

    I don't know enough about codeigniter's workflow but it seems to me that you want to redirect to the login page instead of trying to render it. Evidently, none of the code you supplied sends the template to the browser by the time exit() is called.

提交回复
热议问题