PHP filectime() Function
❮ PHP Filesystem ReferenceExample
Get last change time of "webdictionary.txt":
<?php
echo filectime("webdictionary.txt");
echo "<br>";
echo "Last changed: ".date("F d Y H:i:s.", filectime("webdictionary.txt"));
?>
Run Example »
Definition and Usage
The filectime() function returns the last time a file was changed.
This function checks for inode changes as well as regular changes. Inode changes is when permissions, owner, group or other metadata is changed.
Tip: Use the filemtime() function to return the last time the file content was changed.
Note: The result of this function is cached. Use clearstatcache() to clear the cache.
Syntax
filectime(filename)
Parameter Values
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to check |
Technical Details
Return Value: | The last change time as a Unix timestamp on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
❮ PHP Filesystem Reference