質問するログイン新規登録

回答編集履歴

3

訂正

2015/04/17 14:47

投稿

退会済みユーザー
answer CHANGED
@@ -1,6 +1,8 @@
1
1
  ```
2
- header('Content-Type: application/pdf');
2
+ header('Content-Type: application/x-download');
3
3
  header('Content-Disposition: attachment; filename="'.$file.'"');
4
4
  ```
5
5
 
6
- こんなですね。
6
+ こんなですね。
7
+
8
+ ※画面表示用のコードと間違えたので訂正しました。

2

訂正

2015/04/17 14:47

投稿

退会済みユーザー
answer CHANGED
@@ -1,6 +1,6 @@
1
1
  ```
2
2
  header('Content-Type: application/pdf');
3
- header('Content-Disposition: inline; filename="'.$file.'"');
3
+ header('Content-Disposition: attachment; filename="'.$file.'"');
4
4
  ```
5
5
 
6
6
  こんなですね。

1

正確に

2015/04/17 14:46

投稿

退会済みユーザー
answer CHANGED
@@ -1,6 +1,6 @@
1
1
  ```
2
2
  header('Content-Type: application/pdf');
3
- header('Content-Disposition: inline; filename="'.$name.'"');
3
+ header('Content-Disposition: inline; filename="'.$file.'"');
4
4
  ```
5
5
 
6
6
  こんなですね。