Copyright © tutorialspoint.com
| int fileatime ( string $filename ); |
Gets the last access time of the given file.
| Parameter | Description |
|---|---|
| filename | Path to the file. |
Returns the time the file was last accessed, or FALSE in case of an error. The time is returned as a Unix timestamp.
Following is the usage of this function:
<?php
$filename = "/home/httpd/html/index.php";
if (file_exists($filename)) {
echo "$filename was last accessed: " .
date("F d Y H:i:s.", fileatime($filename));
}
?>
|
Copyright © tutorialspoint.com