Welcome Guest, Not a member yet? Register   Sign In
Why MY_Controller.php in application/libraries not work on CI2.0?
#1

[eluser]CodeIgniterStep.Com[/eluser]
Dear All,

I have create MY_Controller.php in folder application/libraries/MY_Controller.php

MY_Controller.php
Code:
class MY_Controller extends CI_Controller
{
    public function MY_Controller()
    {
         parent::CI_Controller();
        
    }
}

and I created sample.php in folder application/controllers/sample.php

Code:
class Sample extends MY_Controller
{
    public function __construct()
    {
        parent::MY_Controller();
    }
    public function index()
    {
       //.....
    }
}

After I call to the URL http://localhost/index.php/sample it return error message
Quote:Fatal error: Class 'MY_Controller' not found in D:\xampp\htdocs\CI2\application\controllers\sample.php on line 2


Messages In This Thread
Why MY_Controller.php in application/libraries not work on CI2.0? - by El Forum - 11-04-2010, 11:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB