请问HEX的HMVC如何实际运用?
1)下载1.7.22)把HEX的HMVC的内容拷贝到application中3)输入 http://localhost/ci/
显示结果:
Welcome to CodeIgniter!
The page you are looking at is being generated dynamically by CodeIgniter.
If you would like to edit this page you'll find it located at:system/application/views/welcome_message.php
The corresponding controller for this page is found at:system/application/controllers/welcome.php
If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.
Page rendered in 0.0474 seconds
Folder_Test_Main_data_modelfolder/test/views
Test2_Main_data_modeltest2/views
但是我输入http://localhost/ci/test2
Not Found
The requested URL /ci/test2 was not found on this server.
实在不明白这个HMVC的作用是什么以及怎么运用? 什么是 HMVC 楼主应该先 google 一下。
实际上就是一种 Module,有点像“控件”的概念,就是每个模块都有自己的 MVC 结构,可以把模块放到任何的视图里。 回复 2# Hex
这我当然知道,我只是奇怪怎么也输不出你程序的结果,比如;http://localhost/hmvc/index.php/test2,404;http://localhost/hmvc/index.php/test2/home_made/,404.......见谅了。 结果?你要什么结果?那只是个例子。
Module 本身不能通过 URL 访问。 是在视图里调用的. 回复 4# Hex
是这样的,在ZF中的module中的URL是这样访问的:http://localhost/web/moudlename/controllername/methodname。因此我认为你这个扩展也应该类似的,所以我就直接在浏览器里面输入http://localhost/ci/test2/home_made/index。。。。。。
看来我还是不理解HMVC? Module 可以通过 URL 访问,那和控制器有什么区别?
控制器直接分目录不就完了吗?呵呵
页:
[1]