Hi,
I've just found that __autoload function is no longer the thing to use when creating an object from your class. Well thanks a lot!!! Now we have this spl_autoload_register AND spl_autoload. All the manuals I've read I am still lost... just a simple example would be great!!!
THE OLD WAY
function __autoload($classname) {
$filename = "./inc/". $classname .".inc";
include_once($filename);
}
$Object_name = new Class_name();
$Object_name->Methods_name($Paramater) == Boolean_Return;
QUESTION: WHATS THE NEW WAY???
spl_autoload_register(function ($class) {
include './inc/' . $class . '.inc';
});
$Object_name = spl_autoload_register(Class_name())
$Object_name->Methods_name($Paramater) == Boolean_Return;
Kind regards and thanks...