CodeIgniter global variable

后端 未结 4 820
无人共我
无人共我 2021-02-01 10:08

I am using $data in all my views $this->load->view(\'my_view\', $data);

I have also autoload a Controller following this guide Exten

4条回答
  •  太阳男子
    2021-02-01 10:39

    Rather than making the view data global, I'd recommend using HMVC to build a module to produce this sidebar view. HMVC is a nice clean way of coding partial views.

提交回复
热议问题