<?php

// ダウンロード元のファイルパス（絶対パス、ファイル名まで含む）を指定する
$fullpath = './jra_test.csv';

// 保存時のファイル名を設定
$filename = 'JRAテストCSVファイル.csv';

// HTTPヘッダ送信。ローカルPCに保存するためのダイアログが出る。
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"".urlencode($filename)."\"");
// ファイルを読み込んで出力します。
readfile($fullpath);
?>
