Name Collisions with autoload (best guess) |
[eluser]micha8l[/eluser]
Here's part of my directory structure: Code: application/ I $autoload['article_category_model'] using config file. In my "application/controllers/_administrator/article" controller I have this code: Code: class Article extends Administrator_controller It seems that when I call article_category_model's create issue method, CI will search for the method in "application/models/article_category_model.php" instead of "application/models/_administrator/article_category_model.php". Please help, how can I fix this, 3 hours I've been at this!
[eluser]Aken[/eluser]
Blank screen = error. Turn error reporting on in your php.ini file / locally in index.php, and see what the error says. Debug from there. You cannot declare the same class name in PHP, even if they're in different files in different directories. Your model class names must be different.
[eluser]micha8l[/eluser]
[quote author="Aken" date="1344499369"]Blank screen = error. Turn error reporting on in your php.ini file / locally in index.php, and see what the error says. Debug from there. You cannot declare the same class name in PHP, even if they're in different files in different directories. Your model class names must be different.[/quote] Thanks for correcting me on that Aken, blank screen is indeed error. However error reporting is on, as I've tested it -- this is something else. However I did not know I could not declare same class name, I'm newbie and my cracks are showing And so I look into namespaces http://www.php.net/manual/en/language.na...ionale.php |
Welcome Guest, Not a member yet? Register Sign In |