Is the file a directory: is_dir()
$file = "test.txt";
outputFileTestInfo( $file );
function outputFileTestInfo( $f ){
if ( ! file_exists( $f ) ){
print "$f does not exist
";
return;
}
print "$f is ".(is_dir( $f )?"":"not ")."a directory
";
}
?>