Single page generation, file name: shengcheng.php
$db = mysql_connect("localhost", "root");
mysql_select_db( "study",$db);
// Write the article into 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);
// Increase the counter by one
$fdd=fopen("count.txt","r");
$cdd=fread($fdd,5);
$cdd++;
fclose($fdd);
$fdd=fopen("count.txt","w");
fwrite($fdd,$cdd);
fclose($fdd);
// Article 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";
// Article generation
$ttt=".html";
$n=$cdd.$ttt;
$f = fopen($n, "a");
fwrite($f,$main);
fclose($f);
print "
Submitted successfully
";
?>
Continue to submit the management documents
[The copyright of this article is jointly owned by the author time2 and Oso.com. If you need to reprint, please indicate the author and source]
http://www.bkjia.com/PHPjc/531854.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/531854.htmlTechArticleSingle page generation, file name: shengcheng.php $db = mysql_connect(localhost, root); mysql_select_db(study, $db); // Write the article into the database $t = date(Y-m-d h:i:s); $sql = INSERT INTO w...