如果您打算将页面的输出保存在文件中,则可以使用缓冲来做到这一点。您需要使用的功能是ob_start和ob_get_contents。
<?php// Start the buffering //ob_start();?>Your page content bla bla bla bla ...<?phpecho '1';// Get the content that is in the buffer and put it in your file //file_put_contents('yourpage.html', ob_get_contents());?>这会将页面的内容保存在文件中
yourpage.html。



