// CLASS AUTOLOADER FUNCTIE // Load classes automaticly from a specific location when needed function __autoload($className) { getFromDir('classes', $className.'.class.php'); } function getFromDir($dir, $classFile){ if(is_file($dir.'/'.$classFile)){ require_once($dir.'/'.$classFile); }elseif ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { if(is_dir($dir.'/'.$file)){ getFromDir($dir.'/'.$file, $classFile); } } } } }
// CLASS AUTOLOADER FUNCTIE // Load classes automaticly from a specific location when needed function __autoload($className) { getFromDir('classes', $className.'.class.php'); } function getFromDir($dir, $classFile){ if(is_file($dir.'/'.$classFile)){ require_once($dir.'/'.$classFile); }elseif ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { if(is_dir($dir.'/'.$file)){ getFromDir($dir.'/'.$file, $classFile); } } } } }
|