|
|
简单的留言板,解决了长英文字符的问题哦,不过汉字又出问题了:)希望大家一起来解决 |
|
|
作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站 |
<? 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>

|
|
相关文章:相关软件: |
|