Home >Backend Development >PHP Tutorial >Alternative message_PHP tutorial

Alternative message_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-13 17:24:48855browse

How to write a message board for a free personal homepage space that supports PHP but does not support users' MySQL? In fact, there is another very simple way to write a message board, which is to operate text files. I made one on the free hip-hop homepage. You can leave a message!
Write two PHP files (note.php and result.php) and add a text file (note.txt) to save the message record.

Okay, let’s look at the example first: (note.php)

Small guestbook


Small guestbook





Your name:


Email:

 
Message:








$f = fopen("note.txt","r");
$msg = fread($f,filesize("note.txt")) ;
fclose($f);

print "$msg"; ?>

Author: Dongfang Yishe
Homepage: PHP Beginner's Garden

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn