CSDN博客

img 8080

简单的留言板,解决了长英文字符的问题哦,不过汉字又出问题了:)希望大家一起来解决

发表于2001/7/19 15:07:00  1060人阅读

<?
if ($message)
{
$message = ereg_replace("rnrn", "n<P>", $message);
$date = date("l, F j Y, h:i a");
$cc=$message;
$dd=strlen($message);
$i=0;$cc="";$ff="";
while($i<=$dd)
{
$ff=substr($message,$i,20);
$cc=$cc.$ff."<br>";
$i+=20;echo "<>".$i."<>";
}

//if ($dd>=40) {$cc=$cc."echo "/n";".substr($cc,$i-40,$dd);}
$message = "<B>$name </B> -- $date<P>$cc<BR><HR>";
$fp = fopen (basename($PHP_SELF) . ".comment", "a");
fwrite ($fp, $cc);
fclose ($fp);
}
@readfile(basename(($PHP_SELF . ".comment")));
?>
<FORM method="post">
<b>Your name:</b><BR><INPUT name="name" type="text" size="55"><BR>
<b>Your comment:</b><BR><TEXTAREA name="message" rows=10 cols=55 wrap=virtual>
</TEXTAREA><BR>
<INPUT name="submit" type="submit" value="Post your comments">
</FORM>
0 0

相关博文

我的热门文章

img
取 消
img