Home  >  Article  >  Backend Development  >  PHP定时刷新当前页面

PHP定时刷新当前页面

不言
不言Original
2018-05-22 16:04:0710880browse

PHP中定时刷新页面的功能如何实现!  
1分钟刷新一次页面!  
这一般不用php实现,用客户端的脚本就可以,甚至用html自带的就行。  
html实现:  

<meta http-equiv="refresh" content="60">echo "<META HTTP-EQUIV=REFRESH CONTENT=&#39;60;URL=index.php&#39;>";

php刷新当前页面  

echo "<script language=JavaScript> location.replace(location.href);</script>";echo &#39;服务器忙,请<a href="javascript:document.location.reload()">刷新</a>页面,或稍后再试!谢谢!!&#39;;exit;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn