PHP: Afficher la taille d’un fichier en octet

Author:
<html>
<head>
<title>Get the file size: filesize</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  (".(filesize($f))." octets)<br>";
}
?>
</body>
</html>
 
           
       

Leave a Reply

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


3 + two =