• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MY_Controller - I can't get it running

#1
[eluser]breastfed[/eluser]
Hello

i am using the CI Version 2.0.2 and try to manage the following scenario:

I want to load two modells on every page / controller in CI.
So i set up the MY_Controller.php in application/core and put in there:

Code:
<?php
class MY_Controller extends CI_Controller {

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

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

My Controllers like "home" and so on have "extends MY_Controller", but the output of doing this is:
Quote:Fatal error: Call to undefined method CI_Controller::CI_Controller() in /application/core/MY_Controller.php on line 10

line 10 is: parent::CI_Controller();

What am i doing wrong?

Many thanks!


Messages In This Thread
MY_Controller - I can't get it running - by El Forum - 10-25-2011, 02:45 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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