Re: using meta http-equiv in php

Re: using meta http-equiv in php

am 30.03.2008 19:16:51 von AnrDaemon

Greetings, Michael Fesser.
In reply to Your message dated Monday, March 10, 2008, 03:07:19,

> .oO(ajtrichards@googlemail.com)

>>You should use something like:
>>
>>header('Location: thankyou.php');
>>die();

> Besides the missing scheme and hostname - this was what the OP was
> trying, but there was some output _before_ the header() call.

And according to PHP specification, "Location" header must contain fully
qualified address, including protocol identificator and host name.

BTW, nothing wrong in sending some output before header() call... if You
REALLY know what You doing. That all depends on Your host configuration.


--
Sincerely Yours, AnrDaemon

Re: using meta http-equiv in php

am 30.03.2008 23:57:38 von Jerry Stuckle

AnrDaemon wrote:
> Greetings, Michael Fesser.
> In reply to Your message dated Monday, March 10, 2008, 03:07:19,
>
>> .oO(ajtrichards@googlemail.com)
>
>>> You should use something like:
>>>
>>> header('Location: thankyou.php');
>>> die();
>
>> Besides the missing scheme and hostname - this was what the OP was
>> trying, but there was some output _before_ the header() call.
>
> And according to PHP specification, "Location" header must contain fully
> qualified address, including protocol identificator and host name.
>
> BTW, nothing wrong in sending some output before header() call... if You
> REALLY know what You doing. That all depends on Your host configuration.
>
>

Wrong. From the PHP manual under the header function:

"Remember that header() must be called before any actual output is sent,
either by normal HTML tags, blank lines in a file, or from PHP."

You CANNOT send output before a header() call. And don't try to claim
you can use ob_start(), etc. That just masks the problem, not solves it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================