Linux Server Administration Tips PHP Tips & Tutorials

PHP: Getting Last Changed Time of a File – File ctime

File ctime may be a little misleading in nature as many would think it as the creation time of the file, but actually it’s the meta data such as the ownership or permissions change time of the file in addition to content modification. To get the ctime of a file in PHP:

$last = filectime('anyfile');

Aside from ctime, you may also want to learn about getting the atime and mtime 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 Shoot me a message.

One reply on “PHP: Getting Last Changed Time of a File – File ctime”

Comments are closed.