Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Class 'B' not found in ...
#1

[eluser]panos konstantinides[/eluser]
Hello all. I am migrating to CodeIgniter 2.0.2. I have a file A.php

Code:
class A extends CI_Controller {
...
}

class B extends A {
...
}

I have this file in the libraries folder.

Then I have another controller

Code:
class Customer extends B {
...
}

in file customer.php but when I try to load the class Customer I get the following error

"Fatal error: Class 'B' not found in E:\applications\Apache2.2\awebapp\application\controllers\customer.php"

Anyone knows why it can't find my controller? I tried to move it to different locations but to no avail. I have followed this guide for the migration.

And a second question. The guide above states "Replace all files and directories in your "system" folder except your application folder." I did that but I noticed that the application folder in CI 2.0.2 is different from the application folder in my old CI version (it has a few more folders like "core" and "third_party"). Anyone knows what they are and if I need them?

Thanks

Panos
#2

[eluser]panos konstantinides[/eluser]
Ok I have found the problem. My controller has to go into the "core" folder. So we also need to update the application folder, this is something that the upgrade user guide does not mention. Man, I love concise and up-to-date documents.
#3

[eluser]Unknown[/eluser]
Wish the user guide did mention it, would have saved me 4 hours. lol
#4

[eluser]InsiteFX[/eluser]
If you searched the forums you would have found it in two seconds!

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB