【发布时间】:2014-07-26 12:09:12
【问题描述】:
我在后台计算我网站各个页面的点击次数,可以在 IE 中重置,但重置按钮在 Chrome 中没有响应。
这里使用的按钮代码:
<input type="submit" name="Submit" value="reset counter" onclick="document.location.href('mailing_stats.php?req=reset_counter4&ev=<?=$getrecent?>&wv=<?=$getrecent2?>');" />
这里是函数:
case "reset_counter4":
$add_current = date('d-m-Y').": e-views: ".$_GET[ev]." - w-views: ".$_GET[wv];
$handle2=fopen("count_history4.txt","a");
//input new value
fputs($handle2,$add_current . "\n\n");
fclose($handle2);
$handlee=fopen("../count_email4.txt","w");
fputs($handlee,"0");
fclose($handlee);
$handlew=fopen("../count_web4.txt","w");
fputs($handlew,"0");
fclose($handlew);
?>
<script type="text/javascript">
document.location.reload('mailing_stats.php')
</script>
【问题讨论】:
-
检查是否在 php.ini 中启用了简写,也让我们知道您使用的是哪个 php 版本??