note 47525 deleted from function.ob-start by sean

From: Date: Fri, 19 Nov 2004 16:28:42 +0000
Subject: note 47525 deleted from function.ob-start by sean
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-80758@lists.php.net to get a copy of this message
Note Submitter: aaron at ganschow dot us ---- In regards to the above content about PHP automatically printing out the Output Buffer, there is a nifty function called ob_end_clean() that will assure that this does not happen. Simply do the following: <? ob_start(); include("consumersurvey-new.txt"); $contents = ob_get_contents(); ob_end_clean(); ?> and the file that is included, anything that is echo'd or printed will be inside the $contents variable. If you were to replace the include() line with an echo, the same statement would apply. Hope this helps. ---- Reason: useless note

« previous php.notes (#80758) next »