开发者

routing Codeigniter with HMVC

开发者 https://www.devze.com 2023-04-10 15:14 出处:网络
I\'m using Codeigniter in combination with Datamapper and HMVC. see folder structure: -application -controllers

I'm using Codeigniter in combination with Datamapper and HMVC. see folder structure:

-application
   -controllers
      -admin
         -admin.php       
   -module开发者_如何学Gos
      -users
        -models
        -controllers
        -views

Now i want to call my admin controller but the functions within this controller are not found only the index. my module controllers are routing correctly. suggestions?


If admin/ was a module, you would be able to access this with /admin/method but since it's in the regular controllers directory, you would need to go to admin/admin/method. You can specify a default controller for a sub-directory inside the controllers directory, but it will only call the index method if no parameters are passed.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号