如何在codeigniter中的hmvc中的另一个模块中加载模型?

时间:2022-10-07 00:00:04

I want to use The Modular Extensions HMVC in my Project like this:

我想在我的项目中使用模块化扩展HMVC,如下所示:

modules  
      module01
            models
                models01.php
            controllers
                controller01.php
            views
                views01.php
      module02
            models
                models01.php
            controllers
                controller01.php
            views
                views01.php
      ‘
      ‘

and i want use 'models01.php' from module01 , is there any way?

我想从module01使用'models01.php',有什么办法吗?

1 个解决方案

#1


22  

$this->load->model("module01/models01");

You can call any models from any module like this. Tested.

您可以从任何模块调用任何模型。测试。

#1


22  

$this->load->model("module01/models01");

You can call any models from any module like this. Tested.

您可以从任何模块调用任何模型。测试。