Simple page buffering technology (3)

Source: Internet
Author: User
Tags php3 file
The ontent. php3 file is used to process dynamic pages. You can use content. php3? Page = id to read a data file. I will not talk about the specific method, as long as you know that each data file has a different ID number, so content. php3? Page = ID indicates a data file.

Line 1-3 generates a temporary file name. Change '? Replace ',' & ''_'.
Row 3: determines whether the temporary file name exists. If yes, execute line 18-22 and end.
Line 6-13: determine the file modification time related to the dynamic page generation and the temporary file update, and set the regenerate flag. Use filemtime () here to get the last modification time.
Line 24-41: use the template class to generate dynamic results and place them in variables. For more information about template processing, see template and PHPLIB processing method.
Line 43-50 generates temporary files. The file is locked to avoid write conflicts.
51st rows, output results.

This is my solution. You can modify it on your own.

Caching is a meaningful technology that increases access speeds and reduces system consumption. However, there may be a variety of methods that everyone can do.


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.