Home > PHP > Last Modified PHP Tag

Last Modified PHP Tag

Here is another quickie. This tag will add the date a file was last modified to the bottom of your page so guests will know how recent the information is.


<?php 
    /* filename: last_modified.php
     * author: Christopher Huyler 
     * data: November 4, 2003
     * Description:
     * This snippit of code obtains the date the current 
     * file was last changed and displays it for viewers to see.
     * You will never have to update the last modified
     * date on a page again. 
     *
     * USE AT YOUR OWN RISK
     */
     echo date("F j, Y"filemtime($_SERVER['SCRIPT_FILENAME'])) 
?>
Categories: PHP Tags:
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.