Re: Dynamic PHP Home Page
| From: | Troels Arvin | Date: | Mon, 10 Jul 2000 01:27:37 +0000 |
| Subject: | Re: Dynamic PHP Home Page | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5666@lists.php.net to get a copy of this message | ||
Ray Street <charay@ihug.co.nz> wrote:
> I need to have part of a site's home page dynamic (the "Last Changed" date).
>
> The way I see it can be done is to have the index.html page call an
> index.php3 file using the meta refresh tag.
[...]
Why the index.html page?
Just use one index file, the index.php file. You could then add the
following code in the very beginning of the page:
<?php
$lastmod=gmstrftime('%a, %d %b %Y %H:%M:%S GMT',getlastmod());
header("Last-Modified: $lastmod");
?>
Then, later in the HTML, you could have this HTML/PHP code:
<p>Last modification date for this page:
<?php print $lastmod; ?>.</p>
--
Greetings from Troels Arvin, Copenhagen, Denmark