CI controller function is ignored

Posted by den-javamaniac on Stack Overflow See other posts from Stack Overflow or by den-javamaniac
Published on 2010-05-09T10:01:43Z Indexed on 2010/05/09 10:08 UTC
Read the original article Hit count: 137

Filed under:
|
|

Hi. I'm trying to pass through a CI tutorial (writing a simple forum) and I can't make a controller function called. To be more specific I have this in a controller:

function  __construct() {
        parent::Controller();
                $this->load->helper('url');
    }

    function index() {
            $data['title'] = "Wlcome to Gossip";
            $data['heading'] = "Welcome to Gossip";
            $data['query'] = $this->db->get('topic')->result();
            $this->load->view('welcome', $data);
    }

        function topic() {
            echo 'testing...';
        }

and when I'm trying to access the /index.php/forum/topic/ uri it just prints out my index() function. Can any one point out what may cause the problem?

© Stack Overflow or respective owner

Related posts about web-development

Related posts about php