<?php function __autoload($classname) { $directorys = array( 'modelo/' ); foreach($directorys as $directory) { if(file_exists($directory.$classname . '.php')) { $full_file = $directory.$classname . '.php'; require_once($full_file); return; } } }
info at phpclasses dot org