Php message book not supported by the database

Source: Internet
Author: User
The code is as follows: Yourname: Yourcomment:

The code is as follows:

Annotate. php3

This is a module that can be placed on any php3 page to allow users to add
Their comments. The comments are stored in a file in the current directory,
Whose name is constructed by adding ". comment" to the calling pages name,
And merged into the calling page dynamically. (The calling page is not
Modified .)

I wrote this because I wanted a simple way to add this functionality to my
Pages without requiring that mySQL be available.

In the message input, blank lines are converted to paragraph tags. No other
Conversions are applied. If you dont want your users to be able to input
Html, uncomment the "strip_tags" line.

Note that the directory must be writable by the web server.

Put this module in some convenient location and then embed it in your pages
Like so:

Require ("/some/full/path/annotate. php3 ");

Or, relative to the docroot:
Require ($ DOCUMENT_ROOT. "/relativepath/php3 ");

Steve Yelvington

If ($ message)
/* Uncomment the next two lines to strip out html from input */
/* $ Name = strip_tags ($ name );*/
/* $ Message = strip_tags ($ message );*/
$ Message = ereg_replace ("rnrn", "n
", $ Message );
$ Date = date ("l, F j Y, h: I ");
$ Message =" $ Name-- $ Date
$ Message
$ Fp = fopen (basename ($ PHP_SELF). ". comment", "");
Fwrite ($ fp, $ message );
Fclose ($ fp );
@ Readfile (basename ($ PHP_SELF. ". comment ")));

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: 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.