i have a file which is mytest.php
how can i display the date that it was modified or created?
Straight out of the manual...............
$filename = 'somefile.txt'; if (file_exists($filename)) { echo "$filename was last changed: " . date("F d Y H:i:s.", filectime($filename)); }
http://us2.php.net/manual/en/function.filectime.php
[man]filemtime[/man] is more suited for this. filectime doesn't report actual data changes to the file, but more permission changes to the file.