Error in redirecting pages via header

ullalax1

New Member
Messages
4
Reaction score
0
Points
1
error : headers already sent


please help me I'm not able to open new page.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Make sure that nothing -- not even whitespace -- is sent by the script before you try to send special headers.

If a php file has a blank line before the opening <?php tag, then that line is sent and you cannot change/add to the headers.
 

pnk

New Member
Messages
22
Reaction score
1
Points
3
Hi,
In addition to the answer by Descalzo, You can also try putting <?php @ob_start(); ?> at top of your php file before everything. A complete detail about the function can be found at php.net documentation. Main cause for the error is that you are echoing outputs before the headers statements. Rule is that the headers must not occur after any output created by the script, output may includes spaces and all possible characters.
 
Top