By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,616 Members | 1,184 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,616 IT Pros & Developers. It's quick & easy.

Page Last updated question

P: n/a
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
May 28 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Rik
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
May 29 '06 #2

P: n/a
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ĝ
- ki******@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
May 29 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.