<html>
<! FileDate.php                                               >
<! Chapter 10, Oracle Database XE PHP Web Programming         >
<! by Michael McLaughlin                                      >
<!                                                            >
<! This script demonstrates a how to read and convert a file  >
<! timestamp to a human readable date.                        >
<head>
<title>
  Chapter 10 : FileDate.php
</title>
</head>
<body>
<?php
  // Read the parameter from the URL.
  $file = $_GET["p_name"];

  // Declare variable to system date and avoid a notice error.
  $info = date('d-M-Y h:i:s');

  // Verify file exists and assign local time in a European date mask.
  if (file_exists($file))
    $info = date('d-M-Y h:i:s',fileatime($file));

  // Print file statistics.
  print $info;
?>
</body>
</html>
