I have read about dynamically loading your class files when needed in a function like this:
function __autoload($className)
{
include(\"classes/$className
Best you can do is to define your own object responsible for autoloading for any subsystem you are programming.
For example:
class BasketAutoloader
{
static public function register()
{
spl_autoload_register(array(new self, 'autoload'));
}
public function autoload($class)
{
require dirname(__FILE__).'/'.$class.'.php';
}
}