CodeIgniter: Load controller within controller

后端 未结 10 1770
余生分开走
余生分开走 2020-11-28 07:43

I have a home controller with an index action that displays a set of featured products. However, the products are managed through a product

10条回答
  •  余生分开走
    2020-11-28 08:33

    Load it like this

    $this->load->library('../controllers/instructor');
    

    and call the following method:

    $this->instructor->functioname()
    

    This works for CodeIgniter 2.x.

提交回复
热议问题