Getting Times and Dates of Files: $_SERVER['SCRIPT_FILENAME'] : _SERVER « Form « PHP






Getting Times and Dates of Files: $_SERVER['SCRIPT_FILENAME']

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

echo 'file was 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.PHP $_SERVER Arguments
6.superglobal variables
7.Output file time
8.Some Common $_SERVER Elements