0

I have an index.php, and I want to grab the .html output of that after it's rendering.

What is the best way to generate the output .html version base on your .php ?


I've tried

<?php
ob_start();
include 'index.min.php';
echo $content = ob_get_clean();
?>
6
  • you will want to look at output buffering php.net/manual/en/ref.outcontrol.php specifically ob_get_contents that you can then write to a file Commented May 18, 2015 at 19:54
  • Very similar to this: stackoverflow.com/q/171318/4770933 Commented May 18, 2015 at 19:54
  • @cmorrissey : Thanks, I'm reading through them now. Commented May 18, 2015 at 19:56
  • @MariM : Mine is not XML. Commented May 18, 2015 at 19:57
  • Same method, different output. Commented May 18, 2015 at 20:00

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.