PHP page timed refresh read the database content, and the reality on the page, how to solve

Source: Internet
Author: User
The PHP page periodically refreshes and reads the contents of the database, and the actual page
For example, a.php page to the real field of age, when the database changes in the time, the a.php page, also automatically refresh the change value.


I beginner PHP, hope that a bit of veteran can say more detailed, the best can give code, thanks.

------Solution--------------------
Do you do Java, the Web application in Java can complete your needs?
------Solution--------------------
Weibo..
------Solution--------------------
Oh, OH. ~~
------Solution--------------------
Customers can automatically update content without doing anything, using Ajax long polling to implement
------Solution--------------------
In terms of the LZ title, if it is under Linux, you can try to crontab a scheduled task to achieve timed read database content, as for Windows I will not ~
------Solution--------------------
Passing...
------Solution--------------------
Just use Ajax. The client continuously sends the query request to change
------Solution--------------------
discuss
In terms of the LZ title, if it is under Linux, you can try to crontab a scheduled task to achieve timed read database content, as for Windows I will not ~

------Solution--------------------
Use
Ajax
Match
Window.setinterval ('??? ', 5000)
It is possible to detect every 5 seconds.
------Solution--------------------
Via the MySQL UDF plus trigger, + AJAX
------Solution--------------------
When you write a query in a.php to read the age field of the database, a.php is just a script,
When you want to use a.php, PHP to explain, the other time nothing, no Java function can be long memory,

Can be supplemented with other PHP extensions.
  • 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.