How to implement HMVC in codeigniter 3.0?

后端 未结 4 1353
面向向阳花
面向向阳花 2020-12-28 22:42

Currently I\'m using codeigniter version 3.0. I want to know how to implement HMVC structure in it, can anyone help?

4条回答
  •  别那么骄傲
    2020-12-28 23:13

    1 Step : Download
    https://github.com/Crypt/Codeigniter-HMVC/tree/master/core Copy MY_Loader.php , MY_Router.php

    paste in

    application/core

    directory

    2 : step Download https://github.com/Crypt/Codeigniter-HMVC/tree/master/libraries

    MX folder

    Paste in

    application/third_party

    3 :Step modules/routes.php

    $route['default_controller'] = 'index.php/Home/Home/index';

    4: step create new folder (Home) in directory application/modules

    5: step application/modules/Home in new Folder (controllers ,models,views)

    Directory Structure e.g.

    __application

    __modules

     __Home
    
        __controllers
    
           __Home.php 
    
        __modules
    
           __home.php
    
        __views
    
           __home.php
    

    6 : step application/modules/Home/controllers in (Home.php)

    
    

提交回复
热议问题