PHP/codeigniter - use of exit()

前端 未结 8 1012
不思量自难忘°
不思量自难忘° 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条回答
  •  -上瘾入骨i
    2020-12-28 17:23

    Put the code in a variable and write it.

    $html = $this->load->view('template',null,true);
    echo $html;
    exit();
    

提交回复
热议问题