这是我Home.Php,我需要显示实时通知,数据库我如何能实现实时通知在我的PHP页面
<html>
<body>
<label>Notifications <?php echo "(".$notification.")"; ?>)</label>
//$notification Contain no. of Notifications From Database
</body>
</html>
这是我Home.Php,我需要显示实时通知,数据库我如何能实现实时通知在我的PHP页面
<html>
<body>
<label>Notifications <?php echo "(".$notification.")"; ?>)</label>
//$notification Contain no. of Notifications From Database
</body>
</html>
在这里它的例子
目前我正在使用@Node Js。在这里我有另一个问题。我需要执行一个查询,如: - select * from tb_users where user_id =“value from Php Session”。我需要从php Session获取User_id执行查询,我该怎么做?:( – Krishnan
AJAX和setInterval将让你中途有。为了接近真正的实时,你可能不得不看看websocket。 –
哪个更安全? – Krishnan
目前我正在使用@Node Js。在这里我有另一个问题。我需要执行如下查询: - select * from tb_users where user_id =“来自Php Session的值”。我需要从php Session获取User_id来执行查询。我该怎么做 ? :( – Krishnan