PHPCMS Open Source program's timed release function

Source: Internet
Author: User
Has the webmaster researched PHP cms? The mechanism of timed release is similar to Weibo fixed-point timing release.

Reply content:

Has the webmaster researched PHP cms? The mechanism of timed release is similar to Weibo fixed-point timing release.

You should use a planning task. Or how to trigger it regularly?

As I said upstairs, it's really a planning task , but there are several ways to implement it:

    1. The use of host system features: Specifically, the Linux host using crontab implementation (CPanel Panel is a write clock daemon , the other should be called Cron it), Windows seems to be called a scheduled task
    2. Write the code for the timed task in a file and then include the file in the form of a picture on the home page, and set the image size to 1px. This code is executed when someone visits the home page . For example:

The
cron file code is as follows:
If (the time now is 8:00) output "Good Morning"
Add this code to the home page, as long as someone to visit the first page will be a judgment, and because it is a size of 1px invalid image, so does not affect the loading speed of the page.

The difference between the two methods is that one is the system automatically access code page, and the other is the user access code page, the system access can be timed execution , and user access unless your traffic is particularly large, it is difficult to do timed execution, can only be automated execution . However, the first method requires high host, Linux needs to be installed with crontab, and the second method has no specific requirements for the host.

The use of crontab is a good choice,
User triggers can affect quantity ....

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