如何在 codeigniter 中的 hmvc 中的另一个模块中加载模型? [英] how load model in another modules in hmvc in codeigniter?
本文介绍了如何在 codeigniter 中的 hmvc 中的另一个模块中加载模型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的项目中使用模块化扩展 HMVC,如下所示:
I want to use The Modular Extensions HMVC in my Project like this:
modules
module01
models
models01.php
controllers
controller01.php
views
views01.php
module02
models
models01.php
controllers
controller01.php
views
views01.php
‘
‘
我想使用 module01
中的 'models01.php',有什么办法吗?
and i want use 'models01.php' from module01
, is there any way?
推荐答案
$this->load->model("module01/models01");
您可以像这样从任何模块调用任何模型.已测试.
You can call any models from any module like this. Tested.
这篇关于如何在 codeigniter 中的 hmvc 中的另一个模块中加载模型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文