codeigniter+HMVC cross module call controller->method

前端 未结 7 1121
有刺的猬
有刺的猬 2020-12-16 01:32

I am pulling all my hair off... Have been searching every thread, would appreciate if someone can point me to a working example.

Accroding to the doc: https://bitbuc

7条回答
  •  萌比男神i
    2020-12-16 02:15

    I ran into the same issue. Make sure you check capitalization of your directories and and controllers. It's not case sensitive for differing between the module and controller name.

    //In my case the below did not work
    $this->load->module('dashboard/Dashboard');
    $this->Dashboard->method();
    
    
    //but 
    $this->load->module('dashboard');
    $this->Dashboard->method();
    //worked
    

提交回复
热议问题