PHP-Code:
function __autoload($classname) {
list($folder, $class) = explode('_', $classname);
// Ausgabe: C:\xampp\htdocs\lib\registry.php
// Ausgabe: C:\xampp\htdocs\core\mydb.php
// Ausgabe: C:\xampp\htdocs\model\terminmodel.php
print_r(ROOT . DS . strtolower($folder) . DS . strtolower($class) . '.php');
require_once(ROOT . DS . strtolower($folder) . DS . strtolower($class) . '.php');
}
$cont = Lib_Registry::getInstance();
$cont->db = new Core_MyDB;
$ont->termin = new Model_TerminModel;
Fatal error: Class 'Lib_Registry' not found in C:\xampp\htdocs\index.php on line 15
Kommentar