Mam taką klasę
class AutoClassLoader { private function __constructor() { } { if (self::$loader = null) { self::$loader = new self(); } return self::$loader; } public function loadControllers($className) { $file = "/application/controllers/" . $className . '.php'; { require_once $file; } } }
nastepnie w pliku index.php, mam
require_once('config/AutoClassLoader.php'); AutoClassLoader::getInstance(); $obj= new DishController();
wg mnie powinno załadować klasę, ale wyrzuca mi błąd że brak klasy. Gdzieś jest błąd, ale gdzie ?
