Reply to Re: [PHP] Headers already sent error

Your name:

Reply:


Posted by Chris on 10/04/41 11:07

Tim Burgan wrote:

> Hello,
>
>
> I'm receiving an error "Cannot modify header information - headers
> already sent by XXX".
>
> In my php, I have a heap of code, then use header("Location:
> blah.php"); to redirect the user. I get this error on the webhost, but
> not on my local host.
>
> I've searched and found that this can be caused by spaces after the
> closing php tag, but I don't have any.
>
> What could this be?
>
>
> Tim
>
Rest assured, *something* is getting output before you try that header()
call. Anything outside of PHP tags (carriage rturns/line feeds/spaces)
any echo or print.

To help you figure it out, try doing something like exit('STARTOFBODY');
instead of the header call. Then view the source of the ouput and see
what precedes that

Chris

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация