PHP: Véfirier si élément est un fichier

Author:
<html>
<head>
<title>Is it a file: is_file()</title>
</head>
<body>
<?php
$file = "test.txt";
outputFileTestInfo( $file );
function outputFileTestInfo( $f ){
   if ( ! file_exists( $f ) ){
       print "$f does not exist<BR>";
      return;
   }
   print "$f ".(is_file( $f )?"est ":"n'est pas ")." un fichier<br>";
}
?>
</body>
</html>
 
           
       

Leave a Reply

Your email address will not be published. Required fields are marked *


+ 9 = eleven