note 54926 modified in function.include by aidan
| From: | aidan@php.net | Date: | Sat, 15 Apr 2006 16:34:51 +0000 |
| Subject: | note 54926 modified in function.include by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-108164@lists.php.net to get a copy of this message | ||
Hi, there...
I've use this in order to grab the output from an include() but without sending it to the
buffer.
Headers are not sent neither.
<?php
function include2($file){
$buffer = ob_get_contents();
include $file;
$output = substr(ob_get_contents(),strlen($buffer));
ob_end_clean();
ob_start();
echo $buffer;
return $output;
}
?>
--was--
Hi, there...
I've use this in order to grab the output from an include() but without sending it to the
buffer.
Headers are not sent neither.
function include2($file){
$buffer = ob_get_contents();
include $file;
$output = substr(ob_get_contents(),strlen($buffer));
ob_end_clean();
ob_start();
echo $buffer;
return $output;
}
http://php.net/manual/en/function.include.php