Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php autoload classes

<?php
spl_autoload_register(function ($class_name) {
    include $class_name . '.php';
});

$obj  = new MyClass1();
$obj2 = new MyClass2(); 
?>
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #autoload #classes
ADD COMMENT
Topic
Name
3+3 =