如何在特定时间重新加载page.php,例如:07:45.非持续时间,例如:每5秒


How to reload page.php on certain time, ex: at 07.45. Not duration time, ex: every 5 seconds

我有问题。我想在特定时间重新加载/刷新page.php,例如在07.45,而不是每次持续时间,例如每5分钟。直到现在我还没有找到。也许是php、javascript或其他解决方案。请帮帮我。

<meta http-equiv="refresh" content="10" />
setTimeout(function(){
   window.location.reload(1);
}, 10000);

如果您想在特定时间刷新页面,可以使用PHP的date('H:i')函数获取时间。如果条件允许,刷新页面内部,请使用setTimeout在一段时间后继续调用此函数。只要条件满足条件中提供的时间,页面就会刷新。

相关文章: