Home Backend Development PHP Tutorial A personal web page automatic generation system 1_PHP tutorial

A personal web page automatic generation system 1_PHP tutorial

Jul 13, 2016 pm 05:26 PM
personal Homepage create good generate use system Web page automation Configuration

Before you want to use this system to create your personal homepage, I believe you have already configured the relevant Apache server, MYSQL database, and PHP.
Then start your mysql database, create a database named study, and create a table named wenzhang.
Create the following fields under phpMyAdmin:
id smallint(5) No 0 auto_increment
timu varchar(200) Yes
zuozhe varchar(18) Yes
laiyuan varchar(40) Yes
textt text Yes
riqi datetime Yes
Single page submission. File name: input.php


Untitled Document






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);
// Increment 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
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to send web pages to desktop as shortcut in Edge browser? How to send web pages to desktop as shortcut in Edge browser? Mar 14, 2024 pm 05:22 PM

How to send web pages to desktop as shortcut in Edge browser?

How to center the WPS Word table How to center the WPS Word table Mar 21, 2024 pm 02:21 PM

How to center the WPS Word table

CUDA's universal matrix multiplication: from entry to proficiency! CUDA's universal matrix multiplication: from entry to proficiency! Mar 25, 2024 pm 12:30 PM

CUDA's universal matrix multiplication: from entry to proficiency!

Huawei's Qiankun ADS3.0 intelligent driving system will be launched in August and will be launched on Xiangjie S9 for the first time Huawei's Qiankun ADS3.0 intelligent driving system will be launched in August and will be launched on Xiangjie S9 for the first time Jul 30, 2024 pm 02:17 PM

Huawei's Qiankun ADS3.0 intelligent driving system will be launched in August and will be launched on Xiangjie S9 for the first time

Understand Linux Bashrc: functions, configuration and usage Understand Linux Bashrc: functions, configuration and usage Mar 20, 2024 pm 03:30 PM

Understand Linux Bashrc: functions, configuration and usage

What should I do if the images on the webpage cannot be loaded? 6 solutions What should I do if the images on the webpage cannot be loaded? 6 solutions Mar 15, 2024 am 10:30 AM

What should I do if the images on the webpage cannot be loaded? 6 solutions

Introduction to methods for individuals to join corporate WeChat Introduction to methods for individuals to join corporate WeChat Mar 26, 2024 am 10:16 AM

Introduction to methods for individuals to join corporate WeChat

How to open php on the web page How to open php on the web page Mar 22, 2024 pm 03:20 PM

How to open php on the web page

See all articles