問題描述
我想在網(wǎng)頁上反映數(shù)據(jù)庫表中立即發(fā)生的更改.我一直在閱讀有關(guān) websockets 的內(nèi)容,但我不太清楚如何實現(xiàn)它.我想知道如何才能提取已添加到表中的新信息,以及如何讓服務(wù)器將其推送到瀏覽器.
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 應(yīng)用程序,即 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
這篇關(guān)于刷新有關(guān)數(shù)據(jù)庫更新的網(wǎng)頁的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!