fileatime

int fileatime(string filename) 

Retrieves a file’s last access time.

Returns:

Time; FALSE on error

Description:

Returns the time when the specified file was last accessed. The return value is a UNIX timestamp.

Note:

The results of this function are cached. See clearstatcache() for details.

Example:

Show date of last access
$filetime = fileatime("myfile"); 
echo (date("d M Y", $filetime)); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.