Resio sam problem, klase su mi bile velikim slovima a ja sam stavio strtolower zbog toga je greska evo ispravan kod
<?php
function __autoload($class_name)
{
try
{
$class_file = 'classes/'. $class_name.'.php';
if(is_file($class_file))
{
require_once $class_file;
}
else
{
throw new Exception("Unable to load class $class_name in file $class_file.");
}
}
catch (Exception $e)
{
$e->getMessage();
}
}
?>
|