PHP Included Files Date Tip

9th October 2002 · Last updated: 5th October 2016
 

If you're using separate files in PHP via include or fopen then use this code to get the date the files were last modified on your main page:

$filemod = filemtime("filename");
echo "Last modified ";
echo date("j F Y", $filemod);