Home > Backend Development > PHP Tutorial > Alternative message_PHP tutorial

Alternative message_PHP tutorial

WBOY
Release: 2016-07-13 17:24:48
Original
817 people have browsed it

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:

Copy after login

Message:








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

print "$msg"; ?>

Author: Dongfang Yishe
Homepage: PHP Beginner's Garden

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template