CodeIgniter Forums
Problem naming a controller "Directory" - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Problem naming a controller "Directory" (/thread-3176.html)



Problem naming a controller "Directory" - El Forum - 09-14-2007

[eluser]Unknown[/eluser]
I would like to have a controller named Directory but doing so gives a "cannot redeclare class" fatal error. This seems odd as the user guide specifies the controller names which will conflict and "directory" is not one of them.

Further, there doesn't seem to be another directory class in CI - just a few $directory properties floating around. Anyone know what the problem is?

I suppose I could work around by routing requests to /directory/... to /mydirectory/... or something similar but it seems unnecessary.


Problem naming a controller "Directory" - El Forum - 09-14-2007

[eluser]esra[/eluser]
I had some similar problems in the past. It's my theory that the PHP reserved names list for PHP4 is incomplete.