Re: [PHP3] How to Ignore Header("Location: $PHP_SELF?UID=$UID");

From: Date: Fri, 21 Jan 2000 14:15:01 +0000
Subject: Re: [PHP3] How to Ignore Header("Location: $PHP_SELF?UID=$UID");
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-14802@lists.php.net to get a copy of this message
At 7:05 PM +0530 1/21/00, kanojia wrote:
Hi I use to get Following Warning Message for using Header("Location: $PHP_SELF?UID=$UID"); How to ignore this Warning Message "Warning: Cannot add more header information - the header was already sent (header information may be added only before any output is generated from the script - check for text or whitespace outside PHP tags, or calls to functions that output text) in abc.php3 on line 3 "
Unlike a lot of software, PHP3 often gives informative error messages :) ...so 'check for text or whitespace outside PHP tags...' Anything that is output before the Header() line will give you this error. That includes any HTML tags. blank spaces, blank lines, tab characters - anything. If you're including files, check that they don't have anything before the opening <? or after the closing ?>. Once PHP finds any characters not inside PHP script tags, it immediately outputs them, causing the web server to send headers & text back to the web browser. After that, you can't add any more HTTP headers! If you're using PHP4, I think there are ways to alter this behavior, but not in PHP3. - steve +---------------- Splurk! Glort! Klikrunk! Ploip! Katoong!---------------+
| Steve Edberg                           University of California, Davis |
| sbedberg@ucdavis.edu                                     (530)754-9127 |
| Computer Consultant                         http://aesric.ucdavis.edu/ |
+------------------ Don Martin 18 May 1931 - 7 Jan 2000 -----------------+

« previous php.dev (#14802) next »