PHP: Getting Last Accessed Time of a File – File atime

File atime is the last accessed time of the file, in PHP, you can get the last accessed time of any file by:

$last = fileatime('anyfile');

You may also want to know how to get the mtime or ctime of a file.

2 thoughts on “PHP: Getting Last Accessed Time of a File – File atime”

  1. Pingback: PHP: Getting Last Changed Time of a File – File ctime

  2. Pingback: Linux: The differences between file times: atime (accessed time), ctime (changed time) and mtime (modified time).

Comments are closed.

Scroll to Top