Home > Archive > PHP Programming > January 2007 > Last-modified?
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]
|
|
|
| Hi all,
I tried putting this at the beginning of a PHP file:
<?php
echo "Last-modified: " . date( "F d Y.", getlastmod() );
print "";
?>
The goal was to ensure that the browser would realize
that the page is newly produced HTML. However its not
working. The browser shows above the page the expression
Last-modified: ...
Can anyone explain how to properly do this?
Thanks.
| |
| Benjamin 2007-01-29, 9:58 pm |
|
On Jan 29, 9:09 pm, "Rarpy" <Rexun...@yahoo.com> wrote:
> Hi all,
>
> I tried putting this at the beginning of a PHP file:
>
> <?php
> echo "Last-modified: " . date( "F d Y.", getlastmod() );
> print "";
> ?>
have you checked to see if getlastmod is actually returning a value?
>
> The goal was to ensure that the browser would realize
> that the page is newly produced HTML. However its not
> working. The browser shows above the page the expression
> Last-modified: ...
>
> Can anyone explain how to properly do this?
>
> Thanks.
| |
| Curtis 2007-01-30, 3:59 am |
| Rarpy wrote:
> Hi all,
>
> I tried putting this at the beginning of a PHP file:
>
> <?php
> echo "Last-modified: " . date( "F d Y.", getlastmod() );
> print "";
> ?>
>
> The goal was to ensure that the browser would realize
> that the page is newly produced HTML. However its not
> working. The browser shows above the page the expression
> Last-modified: ...
>
> Can anyone explain how to properly do this?
>
> Thanks.
>
If you're actually trying to send a header, you need to use the
header() function, not echo it out. Make sure you send the headers
before any output is sent.
See: http://php.net/header
--
Curtis
|
|
|
|
|