So, I'm looking for something more efficient than this:
<?php
ob_start();
include 'test.php';
$content = ob_get_contents();
file_put_contents('test.html', $content);
echo $content;
?>
The problems with the above:
- Client doesn't receive anything until the entire page is rendered
- File might be enormous, so I'd rather not have the whole thing in memory
Any suggestions?