Now let's talk about the reply. php code: --------------------------------- // reply. php & lt ;? & Nbsp; functioncheck_strlen_long ($ txt) {$ lenstrlen ($ txt); $ count0; for ($ i0; $ I & lt; $ len; $ I ++) {if
Now let's talk about the reply. php code:
---------------------------------
// Reply. php
Function check_strlen_long ($ txt)
{
$ Len = strlen ($ txt );
$ Count = 0;
For ($ I = 0; $ I <$ len; $ I ++)
{
If (ord ($ txt [$ I]) <128)
{$ Count = $ count + 1 ;}
If (ord ($ txt [$ I]) = 10 or ord ($ txt [$ I]) = 32)
{$ Count = 0 ;}
If ($ count> = 60)
{
$ Txt [$ I] = "n ";
$ Count = 0;
}
}
Return $ txt;
}
Function encode ($ txt)
{
$ Txt = strip_tags ($ txt );
$ Txt = htmlspecialchars ($ txt );
$ Message = StripSlashes ($ txt );
Return $ message;
}
$ Content = file ("guest.txt ");
$ Disptext = $ content [$ record-1];
If ($ job = "addreply" and $ replyname! = "" And $ replycontent! = "")
{
$ Content = file ("guest.txt ");
$ Count = count ($ content );
$ Time = date (Y, m, d, H, I );
$ Ip = $ REMOTE_ADDR;
$ Replycontent = StripSlashes ($ replycontent );
$ Replyname = encode ($ replyname );
$ Replycontent = htmlspecialchars ($ replycontent );
$ Replycontent = check_strlen_long ($ replycontent );
$ Replycontent = nl2br ($ replycontent );
$ Replycontent = ereg_replace (chr (10), "", $ replycontent );
$ Content [$ record-1] = substr ($ content [$ record-1], 0, strlen ($ content [$ I])-1 ); $ content [$ record-1] = $ content [$ record-1]."
------------------