A personal web page Automated Generation system 3_php Tutorial

Source: Internet
Author: User
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 the counter to a
$FDD =fopen ("Count.txt", "R");
$CDD =fread ($FDD, 5);
$CDD + +;
Fclose ($FDD);
$FDD =fopen ("Count.txt", "w");
Fwrite ($FDD, $CDD);
Fclose ($FDD);
Article generation
$muoban 1 = fopen ("Muoban1.txt", "R");
$muoban 2 = fopen ("Muoban2.txt", "R");
$muoban 3 = fopen ("Muoban3.txt", "R");
$qita = "


Author: $zuozhe Source: $laiyuan

Date: $t


";
$muoban 4=fread ($muoban 1,1000);
$muoban 5=fread ($muoban 2,1000);
$muoban 6=fread ($muoban 3,1000);
Fclose ($muoban 1);
Fclose ($muoban 2);
Fclose ($muoban 3);
$main = "$muoban 4 $timu $qita $muoban 5 $textt $muoban 6";
Article generation
$TTT = ". html";
$n = $CDD. $ttt;
$f = fopen ($n, "a");
Fwrite ($f, $main);
Fclose ($f);
Print " Submit Success
";
?>
continue to submit administrative files


"This document is owned by the author Time2 and house Orso near network, if necessary, please specify the author and source"

http://www.bkjia.com/phpjc/531854.html www.bkjia.com true http://www.bkjia.com/phpjc/531854.html techarticle 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 w ...

  • Related 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.