How does PHP implement the timed release function similar to WordPress?

Source: Internet
Author: User
I have used all the domestic CMS to implement the WordPress-like timed release function in PHP. the timer function is triggered by the user-triggered JavaScript.

However, WordPress can be accurate to the second. If no one accesses it, it will be released on time. how can this problem be solved?

Do you think of a solution together? If you cannot find a solution, let's talk about the JavaScript trigger principle.


Reply to discussion (solution)

No. the wordpress server is constantly refreshing.

Isn't WordPress a blog system written in php? Let's see how he did it.

Since no one visits (including you, of course), how do you know?He released it on time.? Instead of completing access

You may already have records in the database at the time of release, but will not read future records when reading the page. Therefore, the records will only be displayed on the page at the specified time.

First, write it into the database to hide it. When someone else watches the news, make a current time to determine whether it is flushed out.

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.