我无法设置javascript计时器每隔X秒重新加载页面。它必须是一个没有等待时间的完美循环。
我无法使用AJAX。当数据库发生变化时,必须播放全屏视频,并且我无法通过someotherfile.php加载来自AJAX方法的“自动全屏”HTML5视频
我今天花了6个小时试图找到一种方法来做到这一点。显然我不能通过每次现在和之后进行SQL查询来将PHP放入循环中来“监听”。我觉得语言很弱。
答案 0 :(得分:0)
It has nothing in common with PHP weaknesses it's about server side and client side.
Answering your question. You should try using HTML5 server sent events check these links it should clarify you how to do it. There are examples given:
BTW you don't need reload page with JavaScript just simple meta referesh does this.
Note: using EventSource is not supported by all browsers.