开发者

Loading views in codeigniter HMVC not working

I am trying to load a view from a second controller's view within开发者_Go百科 my first controller but it gives the error that the view cannot be found, even though it is there.

Example

Module -> music

Views -> new -> file1.php

Views -> old -> file2.php

Controller -> new.php

From within the new.php I am using the function index() and trying to load the view

     $this->load->view('old/file2.php');

As you can see, I am trying to load the view file2(this is from another controller) from within the controller new but it does not want to display.


pretty sure you need to add the name of the module:

$this->load->view('music/old/file2');

should do it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜