Get the last access time of the specified file in PHP

Description

The following code shows how to get the last access time of the specified file.

Example


/* www  .j  a  v a2  s .co m*/
<?php
    echo fileatime("./a.php");
    echo "<br />";
    echo "Last access: ".date("F d Y H:i:s.",fileatime("./test.txt"));
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    File »




Directory
DirectoryIterator
Drive
File
File Permission
File Read Save
FileSystemIterator
Path
Zip