Description: A very simple PHP small example source code program for generating static pages. If you are learning PHP to generate static pages and feel complicated about the formed CMS, you can download this small program and research and modify it at will. The source code includes the generation The principle of static pages, but the source code is very simple, there are only a few files, and you can understand it at a glance. Experts should take a detour.
The structure of the source code program: There are 8 files in total.
The homepage of index.php reads the news classification content added in the background, and the news classification data is directly placed in the database.
Inc/ database connection file, the user name and password need to be modified manually.
moban/ generates static template files, which can be modified at will according to your own needs.
newslist/ directory where static html files are generated.
images/ pictures needed by the front desk.
data.sql database file, remember to create it.
eWebEditor/ The editor called in the background.
admin/Background program--"There is no login in the background. There are four pages in total. The function of adding news and deleting news. When adding, a static page will be generated directly. When deleting, the generated static html file will be deleted at the same time.
localhost/admin/add.php add news
localhost/admin/del.php delete news
localhost/adminaddnews.php generates static html execution files
localhost/delnews.php When deleting an article, delete the corresponding static html file at the same time. Download instructions: The structure of the small program is very simple. It is used to facilitate the research and use of novice PHP programmers. There are only a few main files.
Expand