Re: (SOLVED) PHP adding phantom output lines

From: Date: Mon, 11 Sep 2000 04:39:40 +0000
Subject: Re: (SOLVED) PHP adding phantom output lines
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-32874@lists.php.net to get a copy of this message
Greetings, Well, it seems that upgrading to 4.0.2 fixed this problem, at least for me. Thanks for all who helped! Matthew At 04:46 PM 9/8/00 -0400, Matthew Hagerty wrote:
Greetings, I posted this to a bug report quite some time ago, but it was *dismissed* as unable to reproduce. The problem happened with the switch to 4.x and I have been waiting to see if it was ever going to get fixed. It hasn't, so I thought I would try again to get the problem resolved. Copy this to a .php file and run it. View the source. Looks fine. Then comment out the: $oHTML->do_html(); line and uncomment the same function call below, but leave the call broken across two lines, just after the arrow operator. Run it and view the source, there will be a blank line *before* the <HTML> tag. I found this because it was creating output before I wanted output and my header() functions were failing. Again, this happened when moving from 3.x to 4.x. Thanks, Matthew <?php class htmlout {
        function do_html()
        {
                print "<HTML>\n<HEAD>\n</HEAD>\n";
                print "<BODY>\nTest\n</BODY>\n</HTML>\n";
        }
} $oHTML = new htmlout; $oHTML->do_html(); /* By placing the function on a separate line, php generates a line of output. Comment out the above line and uncomment the following 2. Then view the HTML generated. Notice the blank line above the <HTML> tag. */ //$oHTML->
//      do_html();
?> -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.dev (#32874) next »