#82 Output Buffering bugs

v1.0 (example)
open
nobody
5
2004-03-03
2004-03-03
No

When using output buffering in the following way:

ob_start();
include('template.html');
$content = ob_get_contents();
ob_end_clean();

Normally this would open and parse template.html and
return a fully parsed file in the $content variable without
any output to the shell/browser.

template.html has contents similar to the following:

---
<html>
blah blah blah
<table><tr>
<?php

echo "<td>This is in code!</td>";

?>
</tr></table>
---EOF---

$content is filled with the right content, but everything
up to <?php is also echoed out to the browser.

Discussion


Log in to post a comment.