PHP: Trouver la date de modification d’un fichier

<html>
<head>
<title>File changed time</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 was changed on ".date( "D d M Y g:i A", filectime( $f ) )."<br>";
}
?>
</body>
</html>
           
       
<html>
<head>
</head>
<body>
<?php
$file = "test.txt";
outputFileTestInfo( $file );
function outputFileTestInfo( $f ){
   if ( ! file_exists( $f ) ){
       print "$f Ce fichier n'existe pas<BR>";
      return;
   }
   print "$f a été modifié le ".date( "D d M Y g:i A", filectime( $f ) )."<br>";
}
?>
</body>
</html>
 
           
       

No Comments

  • Your comment is awaiting moderation

    Play around and buy a number of bangle bracelets
    that you absolutely love and blend with ones you already personal.
    You’ll get many different appears and the most bang on your buck this fashion.

    Stop by my homepage … Joma Jewellery UK (nicenomu.com)

Join the Discussion

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>