note 55984 deleted from function.ob-clean by dams
| From: | dams@php.net | Date: | Fri, 06 Jan 2006 22:03:50 +0000 |
| Subject: | note 55984 deleted from function.ob-clean by dams | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-101324@lists.php.net to get a copy of this message | ||
Note Submitter: Tim Rostad tim at ecads dot com
----
For some unknown reason, when I had a PHP script that would have this basic structure:
<?
// include "somefile"
// send header info
// echo HTML or whatever
?>
I would get a blank line at the beginning of my output. Normally, this isn't a problem BUT I
had a case where the script was attempting to download a .dxf file and the blank line got included
in the downloaded file. I noticed if I simply cut and pasted the contents of the include file
instead of the include statement that the blank line disappeared. However, this was not the
solution I was looking for. What I ended up doing, was changing the structure to this:
<?
// include "somefile"
ob_clean();
// send header info
// echo HTML or whatever
?>
which works fine.