__autoload() help and understanding

alubawlinwala

New Member
I'm trying to use the __autoload() magic method but I don't really understand itI'm using it like this\[code\]function __autoload($class){ require_once("./path/to/classes/".$class.".php");}\[/code\]Ok, a few questions about this. I have 5 class files in my 'classes/' folder and I have a naming structure like so: \[code\]access.class.php\[/code\]One thing I notice is that I cannot load more than 4 classes for some reason, I get an error from my php error reporting that the Class: ClassNameHere is not found or something.so I tweaked the require_once to\[code\]require_once(strtolower("./path/to/classes/".$class.".class.php"));\[/code\]great that works but now I'm back to me wondering why I cannot load more than 4 classes??I have one main class and 3 others that extend that class.
 
Top