klb Posted May 14, 2007 Share Posted May 14, 2007 is there a way to find when a file was last modified in php? Link to comment https://forums.phpfreaks.com/topic/51386-finding-file-age/ Share on other sites More sharing options...
The Little Guy Posted May 14, 2007 Share Posted May 14, 2007 <?php // outputs e.g. somefile.txt was last modified: December 29 2002 22:16:23. $filename = 'somefile.txt'; if (file_exists($filename)) { echo "$filename was last modified: " . date ("F d Y H:i:s.", filemtime($filename)); } ?> Link to comment https://forums.phpfreaks.com/topic/51386-finding-file-age/#findComment-253024 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.