时间:2021-07-01 10:21:17 帮助过:3人阅读
PHP文件名:dome.php
代码如下:
<?php
$string = 1;
ob_start();
@readfile("templets/list.html");
$text = ob_get_flush();
$myfile = fopen("list.html","w");
$text = str_replace ("{counent}",$string,$text);
fwrite($myfile,$text);
ob_clean();
?>
模板文件名:templets/list.html
代码如下:
用户:{counent_user} 标题:{counent_title} 发布时间:{counent_lastdate} |
内容:{counent_content} |
http://www.bkjia.com/PHPjc/981358.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/981358.htmlTechArticlePHP生成静态HTML页面最简单方法示例,静态最简 PHP文件名:dome.php 代码如下:php $string = 1; ob_start(); @readfile("templets/list.html"); $text...