In summary, I want to run a PHP file first and store the output into the buffer so that I can get these codes as my html template and save my database in loading.
so I started to active the output buffer by
ob_start();
and then compiled my PHP file by using
passthru("php whatever_name.php")
It was supposed that the output should be stored in the buffer, so I used
$html = ob_get_contents() to get the compiled codes.
Finally, i closed it by ob_end_clean().
$html was supposed to have the compiled codes and I got nothing from it.