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!