CodeIgniter view loading not loading in order?

前端 未结 4 1109
生来不讨喜
生来不讨喜 2021-01-25 14:57

I have a Controller in CodeIgniter with the following code:

$this->load->view(\"first\");
echo \"LOL\";
$this->load->view(\"second\");
4条回答
  •  伪装坚强ぢ
    2021-01-25 15:42

    Rendering views in code igniter is done at the end. If you wish to render them as you go you can do

    echo $this->load->view("first", array(), true);
    echo "LOL";
    echo $this->load->view("second", array(), true);
    

提交回复
热议问题