开发者

how to refresh a page in php using php background process? Is there ajax backround Process?

开发者 https://www.devze.com 2023-01-03 14:26 出处:网络
How to refresh a page every 10 minutes using php background process? When i login to my account i can check my messages ,on setting timeout function the page reloads ev开发者_运维百科ery 10 minutes bu

How to refresh a page every 10 minutes using php background process? When i login to my account i can check my messages ,on setting timeout function the page reloads ev开发者_运维百科ery 10 minutes but i need the process to run in background , After me logging in,.. if i receive some message i must receive a popup called hai you have a message from this sender


The only thing i understood due to multiple reasons was the refresh every 10 minutes. You can't use php, you must use javascript like so:

<body onload="setInterval('window.location.reload()', 600000);">


You could send a header to the client side with PHP

header("refresh:600"); //600 seconds = 10 minutes
0

精彩评论

暂无评论...
验证码 换一张
取 消