我的留言板
【我要留言
| 返回首页】
if($nam&$content)
{
$fp=fopen("text.txt","a+");
rewind($fp);
$content=htmlspecialchars($content);
$content=ereg_replace(" "," ","$content");
$t=date("Y-m-d-G:i:s");
$liuy="
【".$nam."】  于 ".$t." 留言 E-mail:$address
$content
";
fwrite($fp,$liuy);
fclose($fp);
}
?>
$fp=fopen("text.txt","r");
$message=fread($fp,filesize("text.txt"));
fclose($fp);
$message=nl2br($message);
echo "".$message."";
?>