I have read about dynamically loading your class files when needed in a function like this:
function __autoload($className) { include(\"classes/$className
You can use spl_autoload_register(), adding any existing __autoload() magic to the stack.
__autoload()
function my_autoload( $class ) { include( $class . '.al.php' ); } spl_autoload_register('my_autoload'); if( function_exists('__autoload') ) { spl_autoload_register('__autoload'); } $f = new Foo;