回答編集履歴

1

chousei

2019/06/25 06:48

投稿

yambejp
yambejp

スコア115010

test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  $count=isset($_COOKIE['count'])?(int)$_COOKIE['count']:0;
6
6
 
7
- if(!is_null(filter_input(INPUT_POST,'count'))){
7
+ if(isset($_POST['count'])){
8
8
 
9
9
  $count++;
10
10
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  }
14
14
 
15
- if(!is_null(filter_input(INPUT_POST,'reset'))){
15
+ if(isset($_POST['reset'])){
16
16
 
17
17
  setcookie('count','',time());
18
18
 
@@ -33,3 +33,5 @@
33
33
  </form>
34
34
 
35
35
  ```
36
+
37
+ 場合によってはBOMが悪さする場合もあるので、念の為BOMなしで保存してみてください