Single page generation, file name: shengcheng. php
$ Db = mysql_connect ("localhost", "root ");
Mysql_select_db ("study", $ db );
// Write the article to the database
$ T = date ("Y-m-d h: I: s ");
$ SQL = "INSERT INTO wenzhang (timu, zuozhe, laiyuan, textt, riqi)
VALUES ($ timu, $ zuozhe, $ laiyuan, $ textt, $ t )";
$ Result = mysql_query ($ SQL );
// Add a counter
$ Fdd = fopen ("count.txt", "r ");
$ Cdd = fread ($ fdd, 5 );
$ Cdd ++;
Fclose ($ fdd );
$ Fdd = fopen ("count.txt", "w ");
Fwrite ($ fdd, $ cdd );
Fclose ($ fdd );
// Document generation
$ Muoban1 = fopen ("muoban1.txt", "r ");
$ Muoban2 = fopen ("muoban2.txt", "r ");
$ Muoban3 = fopen ("muoban3.txt", "r ");
$ Qita ="
Author: $ zuozhe Source: $ laiyuan
Time: $ t
";
$ Muoban4 = fread ($ muoban1, 1000 );
$ Muoban5 = fread ($ muoban2, 1000 );
$ Muoban6 = fread ($ muoban3, 1000 );
Fclose ($ muoban1 );
Fclose ($ muoban2 );
Fclose ($ muoban3 );
$ Main = "$ muoban4 $ timu $ qita $ muoban5 $ textt $ muoban6 ";
// Document generation
$ Ttt = ". html ";
$ N = $ cdd. $ ttt;
$ F = fopen ($ n, "");
Fwrite ($ f, $ main );
Fclose ($ f );
Print"
Submitted successfully
";
?>
Submit management documents
[This article is copyrighted by the author time2 and Osso. If you need to reprint it, please indicate the author and its source]