Welcome Guest, Not a member yet? Register   Sign In
HMVC problem about "default controller"
#1

[eluser]jozeunico[/eluser]
Hello, well I want to test the extension for HMVC (clic here).

For install the extension for HMVC y copied the files "MY_Router.php","Modules.php" y "Controller" at path application/libraries.

Then I moved the welcome controller (the original from CI install) and it's view to this path structure:


application/modules/welcome/controllers/
welcome.php
application/modules/welcome/views/
welcome.php


and for testing I created this module:

application/modules/user/controllers/
users.php

application/modules/user/views/
home.php


Here is users.php code (controller):
Code:
<?php
    class Users extends Controller{
    
        function __construct(){
            parent::Controller();
        }
        
        function index(){
            $this->load->view('home');
        }
    }
    
?>

and the content at the view:
Code:
<h1>Hola mundo</h1>


The problem it's that when I go to http://localhost/hmvc/index.php the module that works it's "welcome", well that's ok I guess. When I go to http://localhost/hmvc/index.php/welcome the module works fine too.
Quote:But when I go to http://localhost/hmvc/index.php/user I get this message:

An Error Was Encountered

Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.

If I go to http://localhost/hmvc/index.php/user/users then this module works fine.
How can I get both modules working without write the route till the controller's name ?
o isn't possible? it is fine my installation? or I did it wrong.?

Well Thanks for your time.


Messages In This Thread
HMVC problem about "default controller" - by El Forum - 05-27-2009, 04:58 PM
HMVC problem about "default controller" - by El Forum - 05-27-2009, 05:50 PM
HMVC problem about "default controller" - by El Forum - 05-28-2009, 09:22 AM
HMVC problem about "default controller" - by El Forum - 04-14-2011, 04:20 AM
HMVC problem about "default controller" - by El Forum - 04-14-2011, 12:04 PM
HMVC problem about "default controller" - by El Forum - 11-06-2012, 08:59 PM
HMVC problem about "default controller" - by El Forum - 11-07-2012, 05:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB