回答編集履歴

2

その他修正

2016/06/02 05:06

投稿

mpyw
mpyw

スコア5223

test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ```html
6
6
 
7
- <?php $now = date("Y"); ?>
7
+ <?php $now = idate('Y'); ?>
8
8
 
9
9
  <?php for ($i = 1950; $i <= $now; ++$i): ?>
10
10
 
@@ -98,13 +98,7 @@
98
98
 
99
99
  <select name="year">
100
100
 
101
- <?php template('/path/to/file.php', [
101
+ <?php template('/path/to/file.php', ['from' => 1970, 'to' => idate('Y')]) ?>
102
-
103
- 'from' => 1970,
104
-
105
- 'to' => idate('Y'),
106
-
107
- ]) ?>
108
102
 
109
103
  </select>
110
104
 

1

括弧外し

2016/06/02 05:06

投稿

mpyw
mpyw

スコア5223

test CHANGED
@@ -32,7 +32,7 @@
32
32
 
33
33
  <select name="year">
34
34
 
35
- <?php include('/path/to/file.php') ?>
35
+ <?php include '/path/to/file.php' ?>
36
36
 
37
37
  </select>
38
38
 
@@ -66,7 +66,7 @@
66
66
 
67
67
  extract(func_get_arg(1));
68
68
 
69
- include(func_get_arg(0));
69
+ include func_get_arg(0);
70
70
 
71
71
  }, $file, $args);
72
72