Stop execution after call $this->load->view()

后端 未结 5 983
野性不改
野性不改 2021-01-18 01:40

In Codeigniter, How could we stop the execution after load a view?

I have tried this

function index() {
    $this->load->view(\'myView\');
             


        
5条回答
  •  -上瘾入骨i
    2021-01-18 02:01

    https://www.codeigniter.com/user_guide/general/views.html

    There is a third optional parameter lets you change the behavior of the function so that it returns data as a string rather than sending it to your browser. This can be useful if you want to process the data in some way.

    echo $this->load->view('myView', '', TRUE);
        die();
    

提交回复
热议问题