我想在网页上反映数据库表中立即发生的更改.我一直在阅读有关 websockets 的内容,但我不太清楚如何实现它.我想知道如何才能提取已添加到表中的新信息,以及如何让服务器将其推送到浏览器.
I want to reflect the changes that occur immediately in the table in a database, on the webpage. I have been reading about websockets but I am not very clear about how to implement it. I was wondering that how could I be able to extract that new information is has been added to the table and how do I let the server push it towards the browser.
您也可以尝试使用 Comet 应用程序,即 longpollig - http://www.zeitoun.net/articles/comet_and_php/start
You could also try a comet application i.e. longpollig - http://www.zeitoun.net/articles/comet_and_php/start
这篇关于刷新有关数据库更新的网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
PHP、MySQL PDOException 的死锁异常代码?Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死锁异常代码?)
PHP PDO MySQL 可滚动游标不起作用PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滚动游标不起作用)
PHP PDO ODBC 连接PHP PDO ODBC connection(PHP PDO ODBC 连接)
使用 PDO::FETCH_CLASS 和魔术方法Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔术方法)
php pdo 只从 mysql 获取一个值;等于变量的值php pdo get only one value from mysql; value that equals to variable(php pdo 只从 mysql 获取一个值;等于变量的值)
MSSQL PDO 找不到驱动程序MSSQL PDO could not find driver(MSSQL PDO 找不到驱动程序)