Output file time : _SERVER « Form « PHP






Output file time

 
<?php
  
  $lastmod = filemtime($_SERVER['SCRIPT_FILENAME']);

  echo 'This file was last updated on '
        . date('l d F Y, \a\t H:i:s T', $lastmod)
        . '.';
?>
  
  








Related examples in the same category

1.$_SERVER extracts valuable server- and script-related information
2.Adjusting behavior based on an environment variable
3.Deciding what to do based on request method
4.Log use IP address
5.Getting Times and Dates of Files: $_SERVER['SCRIPT_FILENAME']
6.PHP $_SERVER Arguments
7.superglobal variables
8.Some Common $_SERVER Elements