Re: Re: PHP Header issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
> 
> 
> 
> ralph_deffke@xxxxxxxx
> 
> 
> 
>   ""Ernie Kemp"" <ernie.kemp@xxxxxxxxxxxx> wrote in message news:BLU0-SMTP35A2B5EC02EB211ECAA8B1F9E00@xxxxxxxxxx
>    
>   <html> 
> 
>   <head> 
> 
>   <title>Contact Us</title> 
> 
>   </head> 
> 
>   <body> 
> 
>   <?php header("Location: advertise2.php"); ?>
> 
>   </body> 
> 
>   </html>
> 
>   The above is just snippet of the code but even this simple example throws the Header Warning / Error.
> 
>    
> 
>   Warning: Cannot modify header information - headers already sent by (output started at /home/content/g/t/a /html/yourestate/advertise.php:6) in/home/content/g/t/a /html/yourestate/advertise.php on line 6
> 
>    
> 
>   The anwser may be simple but I have looked a blanks or spaces around the <?php ?> with no success.
> 
>   Ready need your help.
> 
>    
> 
>   Thanks,
> 
>   Ernie Kemp   
> 
>   Phone: 416 577 5565
> 
>   Email:   ekemp@xxxxxxxxxxxxxxxx
> 
>    
> 
>   ...man will occasionally stumble over the truth, but usually manages to pick himself up, walk over or around it, and carry on.
>                                                                                                                       Winston S. Churchill 
> 
>    
> 
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.

Thanks,
Ash
http://www.ashleysheridan.co.uk




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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux