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

質問編集履歴

1

PHPのソース部分を宣言し見やすくしました。

2015/11/10 09:29

投稿

JavaPHP-nosnos
JavaPHP-nosnos

スコア29

title CHANGED
File without changes
body CHANGED
@@ -15,7 +15,7 @@
15
15
  ③header()でダウンロードダイアログを開きファイル出力を行います。
16
16
 
17
17
  ※②③についてはソースは以下のようになっています。
18
- -----------------------------------------------------------------------------------------------------------
18
+ ```php
19
19
  $category = array(1 => 'ステートメント', 2 => 'ポジション', 3 => '全口座');
20
20
  $csv_filename1 = 'temp/'."$str_csv_subject_sub".'('."$category[1]".')'.'.csv';
21
21
  $csv_filename2 = 'temp/'."$str_csv_subject_sub".'('."$category[2]".')'.'.csv';
@@ -47,7 +47,7 @@
47
47
  header(sprintf('Content-Disposition: attachment; filename="%s"', basename($file)) );
48
48
  header(sprintf('Content-Length: %d', filesize($file)) );
49
49
  readfile($file);
50
- -----------------------------------------------------------------------------------------------------------
50
+ ```
51
51
  すると、このindex.php のソースの直下の\temp のフォルダの中に
52
52
  ZIPファイル1つとCSVファイル3つが出力されます。
53
53