版权声明:转载请注明来源,http://blog.csdn.net/u010071211 https://blog.csdn.net/u010071211/article/details/81669867
<?php
ob_start();//开启缓存
//要生成静态网页的内容开始
?>
中间的html代码
<?php
//要生成静态网页的内容结束
//把生成的静态内容保存到文件,而不是输出到浏览器
file_put_contents( 'index222.html', ob_get_clean() );