Headers will be created whenever information is outuputted to the browser.
In this case when you include the .html file into your php script the
browser is going to create all the headers it will ever know for that page.
Obviously this does you no good if you want to add headers later.

Ways around this.  You can use output buffering to set headers in non-linear
format.  You could use a Javascript to refresh the page after it loads.  Or
the way I prefer to do it.. just echo a meta refresh tag between the <head>
tags of your html page.  This works with the vast majority of browsers and
you can control the number of seconds before the page redirects.

echo '<head>';
echo '<META HTTP-EQUIV="Refresh" Content="5;
URL=http://www.yourdomain.com";>';
echo '</head>';

Hope this helps,
Kevin

----- Original Message -----
From: "Norman Zhang" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 19, 2002 3:07 PM
Subject: [PHP] header redirection


> Hi,
>
> I use header(location: ...) for redirection to another page. But I also
want
> to include <title>, <meta> and <link> tags in the other page. Is there a
way
> to this? Because php complains that the header already been sent.
>
> Regards,
> Norman
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to