note 109833 modified in function.ob-get-clean by danbrown

From: Date: Fri, 31 Aug 2012 15:41:11 +0000
Subject: note 109833 modified in function.ob-get-clean by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-190317@lists.php.net to get a copy of this message
&#60;?php&#13;&#10;ob_start();&#13;&#10;echo &#34;1&#34;;&#13;&#10;$content = ob_get_clean();&#13;&#10;&#13;&#10;echo &#34;2&#34;;&#13;&#10;$content .= ob_get_clean();&#13;&#10;&#13;&#10;echo $content;&#13;&#10;?&#62;&#13;&#10;&#13;&#10;This script outputs 21 in CLI mode and 12 otherwise (under my apache and nginx) --was-- <?php ob_start(); echo "1"; $content = ob_get_clean(); echo "2"; $content .= ob_get_clean(); echo $content; ?> This script outputs 21 in CGI mode and 12 otherwise (under my apache and nginx) http://php.net/manual/en/function.ob-get-clean.php

« previous php.notes (#190317) next »