Posted by Gordon Burditt on 05/15/06 21:59
>Cannot modify header information - headers already sent by
>
>when I issue a
>header ("Location: http://www.foobar.com");
Move everything that outputs text to *AFTER* the header() call
(or just delete it, as the text won't be seen anyway).
This includes:
- A blank line outside <?php ... ?>
- A blank line in an include file outside <?php ?>, especially
at the start or end of the file.
- A space or tab outside <?php ... ?>
- Invisible unicode characters inserted by an editor before <?php
- Warning or error messages output by anything you call before
header().
- <!DOCTYPE declarations
- html
>How can I redirect the user to such a site without encountering this error.
If it tells you where the output started, look there and delete the
offending text. It is likely white space of some sort.
Gordon L. Burditt
Navigation:
[Reply to this message]
|