Latest web development tutorials

PHP filectime () function

PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual

Definition and Usage

filectime () function returns the specified file was last modified.

This function will check the routine revision of the file and inode change the situation. inode change the situation means: Modify permission to modify, modify modify the owner, user groups, or other metadata.

If successful, the function will return a Unix timestamp in the form of a file was last modified. If it fails, it returns FALSE.

grammar

filectime(filename)

参数 描述
filename 必需。规定要检查的文件。


Tips and Notes

Note: The results of this function are cached.Use clearstatcache () to clear the cache.

Tip: Use filemtime () function to return the contents of the file was last modified.


Examples

<?php
echo filectime("test.txt");
echo "<br />";
echo "Last change: ".date("F d Y H:i:s.",filectime("test.txt"));
?>

The code above will output:

1138609592
Last change: January 30 2006 09:26:32.


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual