PHP FileName: dome.php
Copy Code code as follows:
<?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 ();
?>
Template filename: templets/list.html
Copy Code code as follows:
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "HTTP://WWW.W3.ORG/TR/HTML4/LOOSE.DTD" >
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 ">
<title>insert title here</title>
<body>
</body>
<table width= "border=" 0 "cellpadding=" 5 "cellspacing=" 1 "align=" center "bgcolor=" #add3ef ">
<tr bgcolor= "#eff3ff" >
<td> User: {Counent_user} title: {Counent_title} publish time:{counent_lastdate}</td>
</tr>
<tr bgcolor= "#fff" >
<td> content:{counent_content}</td>
</tr>
</table>
</form>