Welcome Guest, Not a member yet? Register   Sign In
Problem with HMVC + CI 2.1
#1

[eluser]memVN[/eluser]
I use HMVC to biuld with CI 2.1
structure my code as follows:
application
| Controller
| Home.php
| Models
| Views
| Home.php
| Core (container core HMVC)
| thirt_party (container MX - HMVC)
| Modules
| Welcome
| Controller
| Welcome.php
| Views
| Welcome_message.php

In the routes.php file I config default_contrller ='home';
And site it's worked
However, when I run link http://abc.com/index.php/welcome/welcome is problem errro follow:
Code:
Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.

Who can help me? Thanks
#2

[eluser]dblackherod[/eluser]
is there a home method in your welcome controller? If no, then create one.

Form your uri, it means that you have a controller welcome in welcome module but the description of your problem suggests that you do not have a home method in the controller.

Also, since there is a controller with the same name existing in the module, then you do not need to specify it in your URI.

So, in essence,

http://example.com/index.php/welcome/welcome is the same as http://example.com/index.php/welcome




Theme © iAndrew 2016 - Forum software by © MyBB