PHP + TEXT message book (2)

Source: Internet
Author: User
Last time we studied guest. php file. the specific problem also requires readers and friends to practice it in depth, and requires some tool books to learn. if you have no knowledge of php, I advise you not to read it, I don't have much time and space to explore the usage and significance of a php file one by one. okay. next we will see SyntaxHighlighter. a

Last time we studied guest. php file. the specific problem also requires readers and friends to practice it in depth, and requires some tool books to learn. if you have no knowledge of php, I advise you not to read it, I don't have much time and space to explore the usage and significance of a php file one by one. okay. now let's edit. php file.
-----------
// Edit. php

If ($ Submit)
{
If ($ SavePassWord = "on ")
{Setcookie ("TxtPassword", "$ TxtPassword", time () + 30*24*3600 );}
Else
{Setcookie ("TxtPassword ");}
}
?>





Modify message
Require ("sys. php ");
Function readvalue ($ tags, $ tage)
{
Global $ message, $ long, $ reply;
$ StrStart = strlen (strstr ($ message, $ tags)-strlen ($ tags); // remove the starting position of the string where the variable is located.
$ StrEnd = strlen (strstr ($ message, $ tage ));
$ Len = $ StrStart-$ StrEnd;
$ StrStart = $ long-$ StrStart; // Start character.
$ StrString = substr ($ message, $ StrStart, $ len );
Return $ StrString;
}

Function save ($ record)
{
Global $ TxtContent, $ TxtEmail, $ TxtHomepage, $ TxtEmail, $ TxtName, $ TxtFrom, $ TxtReply, $ REMOTE_ADDR, $ guestfile;
$ Content = file ($ guestfile, "r ");
$ Space = "";
$ Time = date (Y, m, d, H, I );
$ Ip = $ REMOTE_ADDR;
$ TxtReply = StripSlashes ($ TxtReply );
$ TxtContent = StripSlashes ($ TxtContent );
$ TxtContent = htmlspecialchars ($ TxtContent );
$ TxtContent = check_strlen_long ($ TxtContent );
$ TxtContent = nl2br ($ TxtContent );
$ Wcontent ="Message content:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.