note 63294 deleted from function.ob-start by mazzanet
| From: | mazzanet@php.net | Date: | Sun, 19 Mar 2006 01:30:08 +0000 |
| Subject: | note 63294 deleted from function.ob-start by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-106062@lists.php.net to get a copy of this message | ||
Note Submitter:
Reason: wtf
----
if you want output buffering to not work worth a damn, try the following:
obtest2.php:
--------------
<?php
include("obtest.php");
a_start("foo");
echo "foo";
?>
bar!
<?php
Header("Location: ./index.php");
a_end();
?>
obtest.php:
------------
<?php
$foo='bar';
function a_start($val){
ob_start("");
$foo="bar";
echo "foo, bar, foo, bar<br />";
?>
foo, bar, foo, bar<br />
foo, <?php echo $foo.", ".$val; ?>, bar<br />
<?
echo "foo, bar, foo, bar<br />";
}
function a_end(){
?>
foobar!
<?php
ob_end_flush();
}
?>
index.php:
------------
<?php
echo "you'll never get here unless you have output_buffering set to On in your php config
file perhaps!";
?>