CodeIgniter Forums
MY_Controller in CI 2.0 ... - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: MY_Controller in CI 2.0 ... (/thread-33195.html)



MY_Controller in CI 2.0 ... - El Forum - 08-18-2010

[eluser]Met[/eluser]
hi

i keep getting

Code:
Fatal error: Class 'MY_Controller' not found in C:\xampp\htdocs\project\application\controllers\site.php on line 3

I have:

in /application/libraries- saved as "MY_Controller.php"

Code:
<?php

class MY_Controller extends Controller {

    function __construct()
    {
        parent::Controller();

    }

}

and my controller:

Code:
<?php

class Site extends MY_Controller {

    function __construct()
    {
        parent::MY_Controller();
    }

    function index()
    {
        echo 'working..';
    }
}

what am i missing?

thanks


MY_Controller in CI 2.0 ... - El Forum - 08-18-2010

[eluser]danmontgomery[/eluser]
extended core classes belong in core/ in 2.0, not in libraries/


MY_Controller in CI 2.0 ... - El Forum - 08-18-2010

[eluser]Met[/eluser]
that might just explain it Tongue

thanks!