PHP/File Directory/getlastmod

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

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

 
The syntax: int getlastmod (void)
<?
    echo "Last modified: ".date( "H:i:s a", getlastmod() );
?>



getlastmod.php

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



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

 
<?php 
    echo date ("F d Y H:i:s.", getlastmod()) . "<br />"; 
?>



Getting Times and Dates of Files

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



Output the last time your script was updated

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