<html>
<head>
<title>Is the file a directory: is_dir()</title>
</head>
<body>
<?php
$file = "test.txt";
outputFileTestInfo( $file );
function outputFileTestInfo( $f ){
if ( ! file_exists( $f ) ){
print "$f n'existe pas<BR>";
return;
}
print "$f ".(is_dir( $f )?"est ":"n'est ")."pas un répertoire<br>";
}
?>
</body>
</html>
|
<html>
<head>
<title>Is the file a directory: is_dir()</title>
</head>
<body>
<?php
$file = "test.txt";
outputFileTestInfo( $file );
function outputFileTestInfo( $f ){
if ( ! file_exists( $f ) ){
print "$f n'existe pas<BR>";
return;
}
print "$f ".(is_dir( $f )?"est ":"n'est ")."pas un répertoire<br>";
}
?>
</body>
</html>