Simple page buffering Technology (iii) _php tutorial

Source: Internet
Author: User
Tags php3 file
The ontent.php3 file is used to process dynamic pages. The user can read a data file via the Content.php3?page=id number. I'm not going to tell you the exact way, everybody just know that each data file has a different ID number so that the content.php3?page=id can uniquely identify a data file.

第1-3 a row to generate a temporary file name. Replace '? ', ' & ' with characters like ' _ '.
Line 4th, determine if the temporary file name exists, if any, execute the 第18-22 line, and end.
第6-13 line, determine the file modification time associated with generating a dynamic page with the temporary file which update, set the regenerate flag. Use Filemtime () here to get the last modification time.
第24-41, use the template class to generate dynamic results, placed in variables. About the template processing can refer to the "template, Phplib processing method" article.
第43-50 the line, generate a temporary file. The file is locking processed to resemble a write conflict.
Line 51st, output results.

This is my deal, you can modify it by yourself.

Buffering is a meaningful technique that can improve access speed and reduce system consumption. However, there may be a variety of methods, and we can play them freely.
 

http://www.bkjia.com/PHPjc/445595.html www.bkjia.com true http://www.bkjia.com/PHPjc/445595.html techarticle The ontent.php3 file is used to process dynamic pages. The user can read a data file via the Content.php3?page=id number. The concrete method I will not say, everybody just know each data file is ...

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