您现在的位置是:首页 > 电脑技术查询 > web开发

防止重复刷新无效?该怎么处理

编辑:chaxungu时间:2022-10-02 23:14:13分类:web开发

防止重复刷新无效?
PHP code//phpif(!empty($_GET['cloDept']) && !empty($_GET['cloUnit'])){ $mysql->removeAlarm($_GET['cloUnit'],$_GET['cloDept']); echo "<script language='javascript'>alert('refresh-->><<'); Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache); Response.Expires = 0; Response.Buffer = true; Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1); Response.AddHeader('pragma', 'no-cache'); Response.CacheControl = 'no-cache'; </script>"; header('index.php'); }<Meta http-equiv="Refresh" Content="10"><a style='font-size:12px' href='map.php?cloDept=<?=$marks['dept']?>&cloUnit=<?=$marks['unit']?>'>提交</a>

------解决方案--------------------
恭喜楼主了