well i've done something like that for the short term to orgranize a small code library/framework that i'm building for myself and its ok for that. this isn't the actual function, but its the basic jist of it
PHP Code:function imports( $file )
{
if(! file_exists( $file )
{
// let the error handler take care of it
trigger_error('file:'. $file .' does not exist ', E_USER_NOTICE);
return false;
} else {
return (require_once($file));
}
}





Speaking about other languages (especially Ruby) became taboo after a long series of "Ruby has namespaces PHP doesn't" and things like that. It's ok but within limits (i.e. without getting religios about it). And after that limit, there is a place on this forum were you can talk freely about Ruby and it's called "Perl, Python and Other Languages"

Bookmarks