CodeIgniter Forums
Cannot redeclare class - Controller issues - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Cannot redeclare class - Controller issues (/showthread.php?tid=34835)



Cannot redeclare class - Controller issues - El Forum - 10-11-2010

[eluser]MEM[/eluser]
Code:
class Domains extends MY_Controller {
    
        public function Domains() {
    
        parent::Controller();    
    }


Code:
class MY_Controller extends Controller {
    
        public function __construct()
        {
        parent::Controller();
        }
    }

I get: Cannot redeclare class Domains


I have the exact same structure on my Models, and it works there.


Any clue why this is happening?


Thanks in advance,
MEM


Cannot redeclare class - Controller issues - El Forum - 10-11-2010

[eluser]MEM[/eluser]
Ehehehehe Smile

Having the model and the controller with the same class name. Hence, this issue. Big Grin


* El Forum kills himself!