Home > Archive > PHP Programming > May 2006 > Page Last updated question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Page Last updated question
|
|
| Warmbells 2006-05-28, 6:59 pm |
| Hello,
Most of the pages on the site I manage are html with a few with php
snippits on them which are named .php, on the html pages I have a 'Last
Updated' piece of code as follows
Last updated on <strong><!--#config timefmt="%e %B, %Y"-->
<!--#echo var="LAST_MODIFIED"--></strong>
This works fine and gives me the day, month and year it was last
uploaded to the server. I've tried a few combinations of <?php include
once ( different code snippets here); ?> but can't seem to get it to
show when it was last uploaded, can someone point me in the right direction?
Thanks
| |
|
| Warmbells wrote:
> Hello,
>
> Most of the pages on the site I manage are html with a few with php
> snippits on them which are named .php, on the html pages I have a
> 'Last Updated' piece of code as follows
>
> Last updated on <strong><!--#config timefmt="%e %B, %Y"-->
> <!--#echo var="LAST_MODIFIED"--></strong>
>
> This works fine and gives me the day, month and year it was last
> uploaded to the server. I've tried a few combinations of <?php include
> once ( different code snippets here); ?> but can't seem to get it to
> show when it was last uploaded, can someone point me in the right
> direction?
Maybe:
http://nl2.php.net/manual/en/function.filemtime.php
Grtz,
--
Rik Wasmus
| |
| Kim André Akerĝ 2006-05-28, 6:59 pm |
| Warmbells wrote:
> Hello,
>
> Most of the pages on the site I manage are html with a few with php
> snippits on them which are named .php, on the html pages I have a
> 'Last Updated' piece of code as follows
>
> Last updated on <strong><!--#config timefmt="%e %B, %Y"-->
> <!--#echo var="LAST_MODIFIED"--></strong>
>
> This works fine and gives me the day, month and year it was last
> uploaded to the server. I've tried a few combinations of <?php
> include once ( different code snippets here); ?> but can't seem to
> get it to show when it was last uploaded, can someone point me in the
> right direction?
This will be a correct replacement of the SSI code above:
Last updated on <strong><?php
echo strftime("%e %B, %Y",getlastmod());
?></strong>
http://php.net/strftime
http://php.net/getlastmod
--
Kim André Akerĝ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
|
|
|
|
|