In fact, the time to write this code is only nearly three days, not before the detailed thinking and planning (can say a little plan not) that day think of a forum to try, and then do it, and I was only contact with nearly one months of PHP, has not really written the program and other things, In writing this code of two days and a half time, there are several times encountered difficulties, all want to give up, but I still write out, and did not think incredibly can use, so there may be a lot of hidden trouble also can not tell, although it is possible to use.
In another two days, I will go to work, there is no time to carefully check the code from beginning to end, which is one of the reasons I put up, and another reason is that because I want to let everyone look at these characters, I am just a rookie, there may be a lot of shortcuts did not go, there may be many places wrong, And in the last two days I changed some of the code of the page, but the other related code did not remove, so some places a bit repeating. But it works, that's for sure (at least on the surface, I don't have a problem with win98/apache/php/mysql, I don't have any problems with the online test, and I don't know about it in other circumstances. I just want to be the same as my rookie, or more than I can get something from the novice, and those veterans and seniors can write or leave a message to point out the shortcomings or shortcomings, I will be more happy. Because of that, I can learn a lot of things from it. My e-mail address is: hllinyu@netease.com,oicq:2289230, home address is: http://lfox.oso.com.cn
Well, the nonsense said too much, I hope you can put into the work to modify this forum source code, let it become the Chinese self-developed free forum, so that the Forum code as many as I am interested in PHP and feel the ability to do not know the friends of the reference on the line. Let's look at my forum here!
First of all, the two tables to be used to hold the post information of the Foxbbs and storage of user information Useinfo, because the original data space is not very large, so chose the mysql+txt way to do, all the topics in addition to the content is stored in MySQL, Subject content and reply content with relatively large amount of data are stored separately with the extension. Fox and. BBS txt format file, in the table add a file name of the field on the line, in order to avoid repeated file name, take the current system time to do the file name, such as January 2, 2001 11:20 30 seconds sent a post, the file name is 20010102112030.txt I think this can meet the overwhelming majority of the Please, because there may not be a few forums will be hot to every second there are two or more new posts appear! Oh......
The specific situation of this forum can be seen http://lfox.oso.com.cn/foxbbs/foxbbs.php, in addition to the main page on the http://lfox.oso.com.cn/index.php to provide source packaging download, read the source code do not make trouble oh.
Useinfo User Information Sheet
0 usename varchar (8) NOT NULL user name
1 Usepass varchar (8) NOT NULL password
2 Useni varchar (+) NOT NULL nickname
3 Useoicq varchar () NOT NULL
4 Usesex Int (1) NOT NULL user sex
5 useage Int (2) NOT NULL user age
6 Usezy varchar (4) NOT NULL occupation
7 useaddr varchar () NOT NULL address
8 Usemail varchar (+) NOT NULL mailbox
9 Useweb varchar (+) NOT NULL home
USEQM varchar (+) NOT NULL signature
useattr Int (1) Not NULL property 1 User 2 Moderator 3 Admin 4 Webmaster
Useinf Int (1) Not NULL is public information 1 No 2 Yes
Useid Int (5) Not auto_increment primary key user ID number
USEBQ Int (1) NOT NULL expression
RegDate datetime; Registration time
EndDate varchar (+) NOT NULL last arrival time
Ftnum Int (4) Not null number of posts
Usety char (1) NOT NULL
Foxbbs Forum Theme Table
0 ID Int (5) Not auto_increment primary key
1 usename varchar () Not posting user name
2 Ftbq Int (1) Not expression
3 title varchar (max) not subject
4 ftdate varchar () Not posting time
5 mesname varchar () Not content file name 20010102055635 I had to leave one, in case of accident, in fact 14 is enough.
6 Djnum Int (4) Not hit count
7 Hfnum Int (3) not return plural
8 hfdate varchar () not last reply time
9 Hfname varchar () not reply file name
Hfusename varchar (a) not last reply to a person's name
IP varchar (15)
Lockes int 1
Linkfox.inc.php connecting the database with
$dbhostname = "Lfox";
$dbusername = "root";
$dbpassword = "root";
$dbName = "Flyfox";
Mysql_connect ($dbhostname, $dbusername, $dbpassword) OR die ("Unable-CONNECT to database");
@mysql_select_db ("$dbName") or Die ("Unable to select database");
?>
The above describes the source code of my forum source code one, including the source code aspects, I hope to be interested in PHP tutorial friends helpful.