Page 1 of 1

Pipe Output to HTML File

Posted: Thu Nov 13, 2008 5:47 pm
by jnhemley
How can I redirect my output in PHP from a monitor to an html file such that I can bring up the file and display my page as if it would have been originally output to the monitor ?

Re: Pipe Output to HTML File

Posted: Thu Nov 13, 2008 6:16 pm
by Eran

Code: Select all

 
ob_start();
//Render page
$html = ob_get_clean();
file_put_contents('/path/to/page.html',$html);