Home > Article > Backend Development > How to publish notification in php
Method 1:
Use jquery to call the data implementation in the database every once in a while.
Advantages:
Simple
Disadvantages:
Continuous access to the server easily increases the burden on the server .
Method 2:
Using webSocket technology, a channel is established between the server and the web page, and the server can actively send data to the browser.
Recommended tutorial: PHP video tutorial
The above is the detailed content of How to publish notification in php. For more information, please follow other related articles on the PHP Chinese website!