PHP/File Directory/getlastmod

Материал из Web эксперт
Перейти к: навигация, поиск

getlastmod() function returns the most recent modification date and time of the page

   <source lang="html4strict">

The syntax: int getlastmod (void) <?

   echo "Last modified: ".date( "H:i:s a", getlastmod() );

?>

 </source>
   
  


getlastmod.php

   <source lang="html4strict">

<?php $lastmod = date("F d, Y h:i:sa", getlastmod()); echo "Page last modified on $lastmod"; ?>

 </source>
   
  


getlastmod() returns to you a Unix timestamp with the last modified date.

   <source lang="html4strict">

<?php

   echo date ("F d Y H:i:s.", getlastmod()) . "
";

?>

 </source>
   
  


Getting Times and Dates of Files

   <source lang="html4strict">

<?php echo "file was updated on " . date("l d F Y, \a\t H:i:s T", getlastmod()) ; ?>

 </source>
   
  


Output the last time your script was updated

   <source lang="html4strict">

<?php

 echo date ("F d Y H:i:s.", getlastmod()) . "
"; //June 01 2005 20:07:48.

?>

 </source>