时间:2021-07-01 10:21:17 帮助过:26人阅读
$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
<html><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"><title>Insert title heretitle>head><body>body><tablewidth="500"border="0"cellpadding="5"cellspacing="1"align="center"bgcolor="#add3ef"><trbgcolor="#eff3ff"><td>用户:{counent_user} 标题:{counent_title} 发布时间:{counent_lastdate}td>tr><trbgcolor="#fff"><td>内容:{counent_content}td>tr>table>form>html>
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('').text(i)); }; $numbering.fadeIn(1700); }); });http://blog.csdn.net/leedaning/article/details/48088863
以上就介绍了PHP生成静态HTML页面简单方法,包括了HTML方面的内容,希望对PHP教程有兴趣的朋友有所帮助。