Now let's take a look at 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 year m D Day h i min);
$ip = $REMOTE _addr;
$replycontent =stripslashes ($replycontent);
$replyname =encode ($replyname);
$replycontent =htmlspecialchars ($replycontent);
$replycontent =check_strlen_long ($replycontent);
$replycontent =nl2br ($replycontent);
$replycontent =ereg_replace (CHR), "", $replycontent);
$content [$record -1]=substr ($content [$record -1],0,strlen ($content [$i])-1); $content [$record -1]= $content [$record-1]. "
------------------
So far, PHP code we have finished, the rest is you want to make a message Ben's head and bottom
You can design any style. But remember to have at least 3 connections on this head: view back Home
e-mail. This system is not complete. But since this is a text message, so you do not have to worry about the database problems, you just write a guest.txt file is complete. Although this message does not have MySQL and so on, But the function is still good. and is completely your own message book. Well, the next section we'll tell you a few important steps to build and upload a message guest.txt.
Not to be continued ...
http://www.bkjia.com/PHPjc/315491.html www.bkjia.com true http://www.bkjia.com/PHPjc/315491.html techarticle now let's take a look at the reply.php code:---------------------------------//reply.php function Check_strlen_long ($txt) {$len = Strlen ($txt); $count = 0; for ($i =0; $i $len; $i + +) {...