RE: [PHP] Re: PHP Header issue
| From: | Bob McConnell | Date: | Fri, 18 Sep 2009 17:19:48 +0000 |
| Subject: | RE: [PHP] Re: PHP Header issue | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298155@lists.php.net to get a copy of this message | ||
From: Ashley Sheridan
> On Fri, 2009-09-18 at 19:01 +0200, Ralph Deffke wrote:
>> sorry man, but no blancs etc. means NOTHING should be send before the
header
>>
>> it should look like this:
>> <?php
>>
>> header("Location: advertise2.php");
>>
>> ?>
>>
>> here u can do ur html
>>
>>
>>
>> not one! single char incl. space should be outputted before the
> header e.g. before the php open tag.
>>
>
> I think this sort of issue arises particularly because of the
> misconception that PHP is embedded inside HTML pages. Once a person
has
> that idea in their head, they will start to work with an HTML template
> and add PHP as necessary. While that can work, in cases such as this,
> it's best to remember that HTML (and XML or other languages, etc) is
> inserted into PHP scripts.
After using Perl to generate HTML, that is exactly what it looks like. I
always believed that was the way PHP was designed, so the PHP scripts
are embedded inside the HTML. It is a much more logical construct than
trying to use Perl, or C or ...
Bob McConnell