note 12512 deleted from function.virtual by alindeman
| From: | alindeman@php.net | Date: | Sat, 03 May 2003 20:55:20 +0000 |
| Subject: | note 12512 deleted from function.virtual by alindeman | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-47459@lists.php.net to get a copy of this message | ||
Calling virtual() within a script which is being buffered with ob_start() causes the buffer to be
IMMEDIATELY flushed (tested on php 4.0.4pl1).
If the pages you are including must not be parsed in any way, you can use the readfile() function as
a workaround, which behaves correctly (or at least it looks so).
<?
ob_start();
ob_implicit_flush(0);
virtual("/include/copyright.txt");
ob_end_clean();
?>
The contents of copyright.txt will be shown anyways, in spite of the final ob_end_clean().