Categories
Linux Server Administration Tips PHP Tips & Tutorials

PHP: Getting Last Modification Time of a File – File mtime

File mtime is the last modified time of the file or the time when the last modification of the file content occurred. To get the last modified time of the file in PHP, use:

$last = filemtime('anyfile');

Read more about how to get the ctime and atime in PHP.

By Yang Yang

Hello, I'm Yang. I build online businesses that please people. Want to join in and post some useful articles on Kavoir.com? Shoot me a message.

2 replies on “PHP: Getting Last Modification Time of a File – File mtime”

Comments are closed.