Php uses database information to generate static page instance code

Source: Internet
Author: User
This is a php code written by users to generate html pages. it is simple and practical for beginners. if you are learning php to generate static files, this instance is step-by-step from the database to php to the template file. the code is as follows :? Php $ c... this is a php code written by users to generate html pages. it is simple and practical for beginners. if you are learning php to generate static files, this instance is step-by-step from the database to php to the template file. the code is as follows:

    
  Untitled Document     Template File Code. the code is as follows:   
  Untitled Document   
 
 

Name:

{User}

Title:

{Title}

Content:

{Content}

Date:

{Date}

Delete the html code. the code is as follows:

Database structure. use phpmyadmin to import the database.

Table structure 'message'

-- Create table 'message' ('id' int (4) not null auto_increment, 'user' varchar (20) not null, 'title' varchar (100) not null, 'content' text not null, 'date' date not null, primary key ('id') engine = myisam default charset = gbk auto_increment = 3; -- export the data in the table 'message' -- insert into 'message' ('id', 'user', 'title', 'content', 'date') values (1, 'dfkk ', 'database information generation static page', 'www .phprm.com', '2017-02-12 '), (2, 'dfkk', 'database information generation static page ', 'principle is simple ', '2017-02-12 ');

You can use buttons to generate static pages and delete generated static pages.

Moban stores the template folder (do not delete it ).

News generates static page folders (do not delete them ).

Note: The phpmyadmin tool imports the database file message. SQL.


Tutorial address:

Reprinted! But please include the article address ^

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.