The article management system can publish articles on the website, view articles and perform addition, deletion, modification and query operations
1, first of all, it must be saved in the database Article classification information and article details
There are two tables created here cms_category (article classification) table and cms_article (article details) table
create table cms_category(
id int(11) not null primary key auto_increment,
name varchar(33) not null,
sort int(11) not null)
##CHARSET=utf8;
create table cms_article(
id int(11) not null primary key auto_increment,
title varchar(33) not null,
content text not null,
author varchar(33) not null,
addtime timestamp not null,
cid int(11) not null)
CHARSET =utf8;
PDO method to connect and query the database. It is very convenient to call after encapsulation.
2, required The front-end html page displays articles (The specific code of the front-end page will be introduced later)
To display articles, paging will definitely be used, and paging is also done hereThe encapsulation processing of pagination class
3 requires background management of article classification and article addition, deletion, modification and query (The specific code of the background page will be introduced in the following chapters)