CodeIgniter-HMVC | 为 CodeIgniter 增加 HMVC 支持 | Web Framework library
kandi X-RAY | CodeIgniter-HMVC Summary
kandi X-RAY | CodeIgniter-HMVC Summary
一直感觉 CodeIgniter 缺乏好的 HMVC 架构,而且我个人认为目前的几个 HMVC 第三方类库都不是很好,有的要修改 CI 的源代码,有的要引入新的语法,这都不是我喜欢的方式,所以我自己思考了一个方案,希望大家多多提出宝贵意见。这个 HMVC 的特点就是不修改 CI 源代码,不引入新的语法,完全是利用 CI 强大的扩展机制。. 目前的扩展方式是在 application 目录下增加 modules 目录,每个模块有自己的目录,并且模块可以有一级子目录,比如 application/modules/目录/模块名/.... 每个模块都有自己的 MVC 结构,像这样 application/modules/模块名/controllers,application/modules/模块名/models,application/modules/模块名/views 在视图中装载模块:. 这里也可以使用 URL 路由中的默认控制器,默认的方法是 index() 方法,和普通控制器保持一致。如果要传递参数:. 如果需要返回模块的结果而不想输出到屏幕,可以把第 3 个参数设置为 TRUE:. 如果需要从 URL 访问某个模块的某个方法,URL 规则是这样的:. 实际上 /module 后面的内容和前面传入 $this->load->module() 中的参数一致。. 如果要通过 URL 传递参数,则直接加在 URL 后面:. 另外,这里的 URI 可以使用路由规则,也就是说什么样的 URL 都可以,只要最后路由成符合上面的规则即可,比如要使用这样的 URL:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Rap controller action
- Moves the index .
CodeIgniter-HMVC Key Features
CodeIgniter-HMVC Examples and Code Snippets
Community Discussions
Trending Discussions on CodeIgniter-HMVC
QUESTION
I have created a new repository on GitHub. I have used GitHub Desktop to commit all files. All is done. But I can't create a new project with Composer. Here is my repository: https://github.com/xttrust/CodeIgniter-HMVC-EXTRA
I have tried to create a new project like this:
...ANSWER
Answered 2019-Feb-13 at 08:39As Chris mentioned in a comment:
Have you submitted it to Packagist?
I had to merge it with Packagist, and it then worked.
QUESTION
I have developed project in codeigniter-HMVC, now I want to manage urls in standard way.
MY current URLs:
...ANSWER
Answered 2018-Feb-22 at 07:06In ur route.php file u can redirect like this
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install CodeIgniter-HMVC
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page