Codeigniter Version 3.0.0 BUG?

285 views Asked by At

i have created a MY_Controller.php that extends CI_Controller inside application/core folder And Created a Public_Controller.php that extends the MY_Controller at the same folder

I created a User.php controller that extends MY_Controller this works perfectly but when change i the User controller to extend the Public_Controller i got this error

Severity: Error

Message: Class 'Public_Controller' not found

Is this a bug ?

is there any other well known bugs in codeigniter version 3.0.0

2

There are 2 answers

0
Mark Yosef Dancel On BEST ANSWER

I solved the problem sir : i added this block of codes in my application/config/config.php

function __autoload($classname){
        if(strpos($classname, 'CI_')!==0){
    $file = APPPATH.'core/'.$classname.'.php';
    if(file_exists($file)&& is_file($file)){
        @include_once($file);
    }
}

}

1
Narf On

No, it's not a bug ... it doesn't magically include your Public_Controller.php just because you put it there. You have to manually include that file, preferrably from within MY_Controller.php.