- spl_autoload_register: documentation ( source)
- class_exists: documentation ( source)
- file_exists: documentation ( source)
<?php
spl_autoload_register(function($name)
{
global $lpROOT;
if(class_exists($name, false))
return;
$path = "{$lpROOT}/lp-class/{$name}.php";
if(file_exists($path))
require_once($path);
});