Re: Am I blind? simple 15 line code producing error

From: Date: Sun, 03 Nov 2002 22:55:10 +0000
Subject: Re: Am I blind? simple 15 line code producing error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-122582@lists.php.net to get a copy of this message
Paul, Something I don't think others have mentioned yet is tht a common reason for this error is when there is an error somewhere in your script prior to the header() call. Because PHP will output the error to the screen (assuming you don't have any special error handling), it might not be you who is generating output but rather PHP due to an error somewhere. It might even just be a warning. So, the error you are receiving might be a bit misleading. My advice would be to take the header() call out for the moment, and see if you get any output on the screen. If you see something, you've found the problem. If you don't see anything, check for any possible places where whitespace might be output (as others have suggested). Chris Paul wrote:
Warning: Cannot add header information - headers already sent by (output started by.. ..line 6) ...on line 12


« previous php.general (#122582) next »