[英]Sharing controllers, models and views between separate projects in CodeIgniter
Kohana, due to cascading file system and modules, allows to share code in common projects, that contains controllers, views and models directories. 由于文件系统和模块的级联,Kohana允许在包含控制器,视图和模型目录的常见项目中共享代码。 How can I do it in codeigniter?
我该如何在Codeigniter中执行此操作? I want to create sites, that will share some code (admin area views, some models).
我想创建将共享一些代码(管理区域视图,某些模型)的站点。 That is easy in Kohana, we just have to add another directory for Kohana::find_file().
在Kohana中这很容易,我们只需为Kohana :: find_file()添加另一个目录即可。
I think this is a duplication of: 我认为这是重复的:
Codeigniter Shared Resources - Opinions Wanted Codeigniter共享资源-征求意见
And 和
How do I load a view from a specific (shared) path in CodeIgniter? 如何从CodeIgniter中的特定(共享)路径加载视图?
I'm more experienced in Kohana than CI but if I'm right there is a HMVC module in CodeIgniter. 我在Kohana方面比在CI方面更有经验,但是如果我是对的话,CodeIgniter中有一个HMVC模块。 You could see if you are able to request a external page like you can with the HMVC of kohana.
您可以看到是否能够像使用kohana的HMVC一样请求外部页面。
If I may ask. 如果我可以问。 why do you use codeigniter when you know kohana does the job better?
当您知道kohana做得更好时,为什么还要使用codeigniter?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.