PHP – Last Modified Time of File

I was manually entering the last time I edited the file for a project I’m working on. I found a way to automatically do it with php:

<em>Last updated
<?php echo date("F d Y h:i:s.",filemtime(__FILE__)); ?>

Here it is in action: Index.php was last updated
< ?php echo date("F d Y h:i:s.",filemtime('/home/rdehler/raybdbomb.com/index.php')); ?>

Leave a Comment