Is there anyway to find the created time of a directory in php? I've tried filectime
but that only works on files.
In unix a folder is also a file. So it should work for that too
$folder = 'includes';
echo date ("F d Y H:i:s.", filemtime($folder));
Output is
October 06 2010 20:20:58.
It should work for directories, this is what I get:
$ php -r "echo filectime(__DIR__);"
1311596297
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With