質問編集履歴

3

追記しました。

2019/04/20 08:48

投稿

kinmaa
kinmaa

スコア10

test CHANGED
File without changes
test CHANGED
@@ -216,6 +216,12 @@
216
216
 
217
217
  >>追記
218
218
 
219
- code機能に修正いたしました。
219
+ code機能に修正いたしました。ご指摘ありがとうございます。
220
220
 
221
221
  合わせて<input type=〜 />の部分も追記しました。
222
+
223
+
224
+
225
+ また、調べた内容としては$_FILEの値の指定方法、画像アップロードの手順、ルートディレクトリ内の相対パスが間違っていないかです。
226
+
227
+ また、調べ方はGoogleで単語検索やQiita、PHPのマニュアルを読んだりしています。

2

code機能に修正いたしました。見づらくて申し訳ございません。

2019/04/20 08:48

投稿

kinmaa
kinmaa

スコア10

test CHANGED
File without changes
test CHANGED
@@ -26,9 +26,11 @@
26
26
 
27
27
  ①index.php
28
28
 
29
+ ```php
30
+
29
31
  session_start();
30
32
 
31
- ...(中略)
33
+ //...(中略)
32
34
 
33
35
  $fileName = $_FILES['image']['name'];
34
36
 
@@ -72,8 +74,40 @@
72
74
 
73
75
 
74
76
 
77
+ //...(中略)
78
+
79
+
80
+
81
+ <dt>写真など</dt>
82
+
83
+ <dd>
84
+
85
+ <input type="file" name="image" size="35" />
86
+
87
+  <?php if ($error['image'] == 'type'): ?>
88
+
89
+ <p class="error">* 写真は「.gif」「.png」の画像を指定してください</p>
90
+
91
+  <?php endif; ?>
92
+
93
+ <?php if (!empty($error)): ?
94
+
95
+ <p class="error">* 恐れ入りますが、画像を改めて指定してください</p>
96
+
97
+  <?php endif; ?>
98
+
99
+ </dd>
100
+
101
+ ```
102
+
103
+
104
+
75
105
  ②check.php
76
106
 
107
+
108
+
109
+ ```php
110
+
77
111
  session_start();
78
112
 
79
113
  require('../dbconnect.php');
@@ -122,7 +156,7 @@
122
156
 
123
157
 
124
158
 
125
- ...(中略)
159
+ //...(中略)
126
160
 
127
161
 
128
162
 
@@ -132,6 +166,8 @@
132
166
 
133
167
 
134
168
 
169
+ ```
170
+
135
171
  ーーーーーーーーーーーーーーーーーーーーー
136
172
 
137
173
 
@@ -175,3 +211,11 @@
175
211
 
176
212
 
177
213
  よろしくお願いします。
214
+
215
+
216
+
217
+ >>追記
218
+
219
+ code機能に修正いたしました。
220
+
221
+ 合わせて<input type=〜 />の部分も追記しました。

1

Apacheの表記を変えましたが内容な変わらずです。よろしくお願いします。

2019/04/20 08:07

投稿

kinmaa
kinmaa

スコア10

test CHANGED
File without changes
test CHANGED
@@ -140,7 +140,7 @@
140
140
 
141
141
  ①Apache_error.log
142
142
 
143
- File does not exist: /Applications/MAMP/htdocs/mini_bbs/member_picture/20190420094220, referer: http://localhost/mini_bbs/join/check.php
143
+ File does not exist: /Applications/MAMP/htdocs/mini_bbs/member_picture/20190420094220, referer: http://*****/mini_bbs/join/check.php
144
144
 
145
145
 
146
146