PDA

View Full Version : Cannot modify header information



Lilian
29-05-2007, 06:16 PM
Hey,

I seem to be getting this error:


Warning: Cannot modify header information - headers already sent by (output started at /home/************/public_html/process.php:9) in /home/************/public_html/process.php on line 102

This is line 102:

header("Refresh: 0;url=page.html");


Thanks to anyone who can help!

Luckyrare
29-05-2007, 06:24 PM
It seems you have sent out the headers in line 9 aswell, thats the problem

Lilian
29-05-2007, 06:34 PM
$Message=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $Message);if($Name=="" || $Email=="" || $Reason=="" || $Message=="" ){


Thats line 9

Heinous
30-05-2007, 12:59 AM
ob_start();

At top of file. T_T

Lilian
30-05-2007, 08:42 AM
It doesnt matter Ive managed to fix it. Thanks anyway.

*
30-05-2007, 10:06 AM
Some scripts like header("") need to be before any output is sent to the browser, else it gives and error.
If you are really desperate to put it there you can use an iframe (for things like forced downloads)

Want to hide these adverts? Register an account for free!