PHP generates static HTML article publishing system

Source: Internet
Author: User
Tags php file

1. Need a session file, this of course is used to determine whether the administrator of the PHP file.

2. Need a getip.php file, this is to obtain the routing IP, but also for the administrator to judge.

3. Official start of the core document. In html.php, a form is required for logging in. Of course the action of this form is itself. After post, enter the page where an article is published. This page is a title and a content two part. Where title is your title, content is the text. The content part of the input I was using the fckeditor. A very useful editor. And then it was submitted. This post action is also performed by the html.php. Here, add the title to the string of the first page I made. which is between. Then add the content to the original body tag.

4. Generate a file with fopen, which is generated by date (), and fwrite written to this file. So your article page is generated.

5. Generates a catalog file. With the article, of course, you need a directory. But how to create a catalog file. This kind of truth is similar to the above. It's just that you need to pay attention to a problem. At the beginning of the production of the article page, you need to write to a TXT file file name and title. In that case, you'll be able to post your article catalog page generation will be very square .

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.