thorpe wrote:output buffering is the easiest option.
<?php
ob_start();
// script goes here.
$text_file_output = ob_get_contents();
ob_end_flush();
?>
That sorta works.. Although the ob_end_flush returned all results back to the calling script so i got a 7mb php file 😉. This is what i used, but it's still giving some odd results on the calling page.
ob_start();
require('html_template.php');
$html_template = ob_get_contents();
ob_end_clean();