klb Posted May 14, 2007 Share Posted May 14, 2007 is there a way to find when a file was last modified in php? Quote 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)); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/51386-finding-file-age/#findComment-253024 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.