• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Default controller takes all traffic, even when new controllers / views are defined.

#1
[eluser]FragPacket[/eluser]
Greetings all,

I'm not entirely new to PHP, but only began playing with CI about a week ago. I watched the tutorials and get MVC conceptually. Now I've modified my routes to use a newly created default controller, and that works great.

However, when I create a new controller, "Mylinks", the default controller/view is all I see. That is, when I go to http://www.mysite.com/index.php/mylinks, I see the same thing as if I were to have left off the "/mylinks" part of the URI. New controller looks like this:

Code:
<?php

class Mylinks extends Controller {

    function Mylinks() {
        parent::Controller();    
    }
    
    function index() {
        $this->load->view('mylinks_view');
    }

}


The mylinks_view.php file is very simple -- just an HTML hello world. Am I doing something wrong that's making the default controller respond where it shouldn't?

Also, though I'm not sure it's related, the only other change I made to my CI config was to my config.php file:

Code:
$config['uri_protocol']    = "QUERY_STRING";


Many thanks.


Messages In This Thread
Default controller takes all traffic, even when new controllers / views are defined. - by El Forum - 12-15-2008, 04:44 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.