質問編集履歴
1
sanitizeの処理を追加しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -161,3 +161,47 @@
|
|
161
161
|
|
162
162
|
|
163
163
|
```
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
//--------追加--------
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
sanitizeの処理
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
```php
|
178
|
+
|
179
|
+
<?php
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
function sanitize($before){
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
foreach($before as $key=>$value){
|
190
|
+
|
191
|
+
$after[$key]=htmlspecialchars($value);
|
192
|
+
|
193
|
+
}
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
return $after;
|
198
|
+
|
199
|
+
}
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
?>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
```
|