Home > Backend Development > PHP Tutorial > A forum program that imitates oso (Part 1)_PHP tutorial

A forum program that imitates oso (Part 1)_PHP tutorial

WBOY
Release: 2016-07-13 17:31:16
Original
917 people have browsed it

I often use the oso forum, and I personally feel that it is quite good, so I compiled a program that imitated the oso interface and shared it with everyone.
The program consists of three parts, namely displaying topic information, displaying forum information, and adding forum information. The topic and forum content adopt a master-slave relationship.
The table structure is as follows:
drop table fr_t_forumtitle;
create table fr_t_forumtitle(
id     integer,
state varchar(1),
readcount integer,
replycount integer,
title varchar(100),
createman varchar(20),
replyman varchar(20),
replytime datetime);

drop table fr_t_forumcontent;
create table fr_t_forumcontent(
id integer,
replyman varchar(20),
replytime datetime,
replyemail varchar(100),
replyhttp varchar(100),
re plyface smallint,
content text) ;

drop table fr_t_parameter;
create table fr_t_parameter(
code varchar(10),
name varchar(40),
content varchar(10));
insert into fr_t_parameter(code,name,content) values(pageline,page number,20); /* Adjust this parameter to modify the number of lines per page*/

Program 1: mainforum.php(do Develop languages ​​for current mainstream development)





Forum





include ("c:mydbheader.inc");
?>










$dbh = MySQL(The best combination with PHP)_connect(localhost:3306,root,);
MySQL (The best combination with PHP)_select_db(test);

$res=MySQL(The best combination with PHP)_query("SELECT content FROM fr_t_parameter where code = pageline",$dbh);
$row=MySQL(The best combination with PHP)_fetch_array($res);
global $pageline;
$pageline = $row["content"];

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/509080.htmlTechArticleI often use the oso forum, and I personally feel it is quite good, so I made a program that imitates the oso interface, and Share it with everyone. The program consists of three parts, namely displaying topic information and displaying forum information...
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
Current location: Home page - Forum
 
Forum Search