我爲wordpress寫了一個插件,我希望它在每3個小時刷新一次,我嘗試了標題(「refresh:10800; url = example.php」),但我無法得到任何結果。如何在我選擇的一段時間內刷新wordpress插件?
感謝您的幫助。
我爲wordpress寫了一個插件,我希望它在每3個小時刷新一次,我嘗試了標題(「refresh:10800; url = example.php」),但我無法得到任何結果。如何在我選擇的一段時間內刷新wordpress插件?
感謝您的幫助。
,你可以使用JavaScript嘗試:
setTimeout(function(){ window.location = 'example.com' },10800)
讓我們知道了如何在3個半小時左右坐上...
你已經得到的PHP header()
功能之間的困惑, HTML HEAD部分。
的PHP header('Location: newpage.htm');
執行瞬時重定向到newpage.htm(和應直接後跟到die()
一個呼叫)。沒有可能延遲重定向。
中的HTML <head> ... </head>
部分,您可以使用META標籤進行延遲刷新或重定向:
<!-- Refresh the Current Page every 10 minutes (600 seconds) //-->
<meta http-equiv="refresh" content="600">
<!-- Redirect to Another Page with a Delay of 10 minutes (600 seconds) //-->
<meta http-equiv="refresh" content="600;url=http://anotherserver.com/">