回答編集履歴
1
chousei
answer
CHANGED
@@ -1,1 +1,8 @@
|
|
1
|
+
```PHP
|
2
|
+
header('Content-Type: text/csv ');
|
3
|
+
$fp=fopen("PHP://output","w");
|
4
|
+
while($row=$stmt->fetch(PDO::FETCH_ASSOC)){
|
1
|
-
|
5
|
+
fputcsv($fp,$row);
|
6
|
+
}
|
7
|
+
fclose($fp);
|
8
|
+
```
|