首先,打开php编辑器,新建php文件,例如:index.php。(推荐学习:PHP编程从入门到精通)
在index.php中,输入代码:echo ("<script>setTimeout('window.location.reload()', 1);script>");。
立即学习“PHP免费学习笔记(深入)”;
浏览器运行index.php页面,此时发现页面会自动刷新。
代码:
";//echo ("<script type=\"text/javascript\">");echo ("function fresh_page()"); echo ("{");echo ("window.location.reload();");echo ("}"); echo ("setTimeout('fresh_page()',1000);"); echo ("script>");?>
