note 26916 modified in function.getlastmod by danbrown

From: Date: Sun, 20 Jul 2008 00:24:24 +0000
Subject: note 26916 modified in function.getlastmod by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141840@lists.php.net to get a copy of this message
for includes.... <?php //include.php $file = __FILE__; $lastmod = date("M d, Y @ h:ia", filemtime($file)); ?> <?php //footer.php echo("page last modified: $lastmod"); ?> [EDIT by danbrown AT php DOT net: Remember that $lastmod must not be a variable that is set or unset anywhere else in the script, or it will not work as expected when printed from the footer.] --was-- for includes.... <? //include.php $file = __FILE__; $lastmod = date("M d, Y @ h:ia", filemtime($file)); ?> <? //footer.php echo("page last modified: $lastmod"); ?> http://php.net/manual/en/function.getlastmod.php

« previous php.notes (#141840) next »