質問編集履歴
1
一応html部分も追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,7 +24,39 @@
|
|
24
24
|
|
25
25
|
```PHP
|
26
26
|
|
27
|
+
<!DOCTYPE html>
|
28
|
+
|
29
|
+
<html lang="ja">
|
30
|
+
|
31
|
+
<head>
|
32
|
+
|
33
|
+
<meta charset="UTF-8">
|
34
|
+
|
35
|
+
<title>mission_3-1</title>
|
36
|
+
|
37
|
+
</head>
|
38
|
+
|
39
|
+
<body>
|
40
|
+
|
41
|
+
<form action="" method="post">
|
42
|
+
|
43
|
+
<label for="name">名前 </label>
|
44
|
+
|
45
|
+
<input type="text" name="name" placeholder="名前">
|
46
|
+
|
47
|
+
<br>
|
48
|
+
|
49
|
+
<label>コメント</label>
|
50
|
+
|
51
|
+
<input type="text" name="comment" placeholder="コメント">
|
52
|
+
|
53
|
+
<input type="submit" name="submit">
|
54
|
+
|
55
|
+
</form>
|
56
|
+
|
57
|
+
|
58
|
+
|
27
|
-
<?php
|
59
|
+
<?php
|
28
60
|
|
29
61
|
$name = $_POST["name"];
|
30
62
|
|
@@ -48,9 +80,21 @@
|
|
48
80
|
|
49
81
|
|
50
82
|
|
83
|
+
$lines = file($filename,FILE_IGNORE_NEW_LINES);
|
84
|
+
|
85
|
+
foreach($lines as $line){
|
86
|
+
|
87
|
+
echo $line . "<br>";
|
88
|
+
|
89
|
+
}
|
90
|
+
|
51
91
|
}
|
52
92
|
|
53
93
|
?>
|
94
|
+
|
95
|
+
</body>
|
96
|
+
|
97
|
+
</html>
|
54
98
|
|
55
99
|
```
|
56
100
|
|