Posted by Curtis on 01/30/07 06:26
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
[Back to original message]
|