PHP: how can I get file creation date?

Use filectime. For Windows it will return the creation time, and for Unix the change time which is the best you can get because on Unix there is no creation time (in most filesystems).

Note also that in some Unix texts the
ctime of a file is referred to as
being the creation time of the file.
This is wrong. There is no creation
time for Unix files in most Unix
filesystems.

Leave a Comment