EDIT:
Mi import gracias a GatorV:
Código PHP:
function import( $class ) {
$importDir = getcwd() . "/application/";
$classDir = str_replace( ".", DIRECTORY_SEPARATOR, $class );
if( substr( $classDir, -1, 1 ) === "*" ) { // Import several Classes
$classDir = str_replace( "*", "", $classDir );
$importDir .= $classDir;
$archivo=scandir($importDir);
foreach($archivo as $key => $val)
{
$tmp=explode(".",$val);
if(end($tmp)=="php")
require_once($importDir . $val);
}
} else {
$file = $importDir . $classDir . '.php';
if( file_exists( $file ) ) {
require_once( $file );
} else {
throw new Exception( "$class not found" );
}
}
}
__________________
-URL=
Go PHP5.
-Age=22.
-Learning=PHP,J2EE,Struts,MAMBO,C++,JSON,AJAX,XHTML ,CSS.