Php generates a complete html static page instance

Source: Internet
Author: User
If you are an seo worker, you may want to convert all the php files into html pages. this will benefit the website ranking and reduce the apache load on the server, next I will introduce a php static page generation instance. addform .... if you are an seo worker, you may want to convert all the php files into html pages. this will benefit the website ranking and reduce the apache load on the server, next I will introduce a php static page generation instance.

The addform. php file code is as follows:


The add. php file code is as follows:

 

Mysql_inc.php database connection file, the code is as follows:

 Host = $ host; $ this-> name = $ name; $ this-> pass = $ pass; $ this-> database = $ database; $ this-> ut = $ ut; $ this-> connect ();} function connect () {$ link = mysql_connect ($ this-> host, $ this-> name, $ this-> pass) or die ($ this-> error (); mysql_select_db ($ this-> database, $ link) or die ("no database found ". $ this-> database); mysql_query ("set names '$ this-> ut'");} function query ($ SQL, $ type = '') {if (! ($ Query = mysql_query ($ SQL) $ this-> show ('say: ', $ SQL); return $ query;} function show ($ message = '', $ SQL = '') {if (! $ SQL) echo $ message; else echo $ message .'
'. $ SQL;} function affected_rows () {return mysql_affected_rows ();} function result ($ query, $ row) {return mysql_result ($ query, $ row );} function num_rows ($ query) {return @ mysql_num_rows ($ query);} function num_fields ($ query) {return mysql_num_fields ($ query);} function free_result ($ query) {return mysql_free_result ($ query);} function insert_id () {return mysql_insert_id ();} function fetch_row ($ query) {return mysql_fetch_row ($ query);} version function () {return mysql_get_server_info ();} function close () {return mysql_close ();} function htmtocode ($ content) {$ content = str_replace ("n ","
", Str_replace (" "," ", $ content); return $ content ;}$ db = new mysql (" localhost "," root ","", "database", "utf8");?>


Article address:

Reprint at will ^ please include the address of this article!

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.