PHP filectime()Function
Complete PHP Filesystem Reference
Definition and Usage
The filectime() function returns the last modification time of the specified file.
This function checks the daily modification and inode modification of the file. Inode modification refers to: permission changes, owner changes, user group changes, or other metadata changes.
If successful, the function returns the last modification time of the file as a Unix timestamp. If it fails, it returns FALSE.
Syntax
filectime(filename)
| Parameter | Description |
|---|---|
| filename | Required. Specifies the file to check. |
Tips and Notes
Note:The results of this function are cached. Use clearstatcache() to clear the cache.
Tip:Use the filemtime() function to return the time when the file content was last modified.
Example
<?php
echo filectime("test.txt");
echo "<br />";
echo "Last change: ".date("F d Y H:i:s.",filectime("test.txt"));
?>
echo filectime("test.txt");
echo "<br />";
echo "Last change: ".date("F d Y H:i:s.",filectime("test.txt"));
?>
The above code will output:
1138609592
Last change: January 30 2006 09:26:32.
Last change: January 30 2006 09:26:32.
Complete PHP Filesystem Reference Other Extensions