PHP 写入 文本数据库 / Add text to text file
<form action="<? $PHP_SELF ?>" method="post"><br><input type="text" name="name" value="Name"><br>
<textarea type="text" name="comm">
Add Your Comment
</textarea><br>
<input type="submit" value="Add">
<?
//ALL You need is to create comment.txt file, and give CHMOD 777
$date = date("d.m.Y");
if (!isset ($comm) && ($name)){
$fp = fopen("comment.txt","a+");
fwrite($fp,nl2br("<meta http-equiv=Content-Language content=hr><table border=1 width=276 height=16><td width=128 height=4>Name:$name</td><td width=132 height=4>Date:$date</td><tr><td width=266 height=9 colspan=2>$comm</td></tr></table><br>"));
fclose($fp);
}
?>
Messages:
<?
readfile ("comment.txt");
?> 這個!該不會是............. 什么内容呢,看看
页:
[1]