[英]Call Controllers models and views in codeigniter PATH
I have to use method of a controllers created in codeigniter path: 我必须使用在codeigniter路径中创建的控制器的方法:
In my controller(application/controllers/examplecontroller.php) i have to load modules controller that call modules models and modules views. 在我的控制器(application / controllers / examplecontroller.php)中,我必须加载调用模块模型和模块视图的模块控制器 。
It is possible in codeigniter??? 有可能在codeigniter ???
EDIT: 编辑:
I have my controller in application/controllers/hello.php. 我的控制器位于application / controllers / hello.php中。
Here i have to load a modules that have a controller called for example news.php in folder modules/controllers. 在这里,我必须加载一个文件夹控制器/文件夹中的模块,该模块具有一个名为例如news.php的控制器。 This news controller, call a model in modules/news_model.php that load news from my DB. 此新闻控制器在modules / news_model.php中调用一个模型,该模型从我的数据库中加载新闻。 Then, in the controller i have to call a view in modules/views allnews.php that show my news!! 然后,在控制器中,我必须在显示我的新闻的模块/视图allnews.php中调用视图!
In codeigniter controllers, models and views are in application path! 在codeigniter控制器中,模型和视图位于应用程序路径中! I have to load cotnrollers, models and views in another folder then codeigniter/application path! 我必须将cotnrollers,模型和视图加载到另一个文件夹中,然后再加载codeigniter /应用程序路径!
是的,您可以执行此操作,但是它在应用程序文件夹中以及它的HMVC Codeigniter资产基本上用于javascript,图像或其他文件或css文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.