phpでファイルをダウンロードさせるさいに
使えるコードが紹介されていたのでメモ
PHPでファイルをDLさせる際のPHPコード例:phpspot開発日誌
以下引用です。
<?php
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="dl.zip"'); //ファイル名を通知
header('Content-Length: '.filesize('dl.zip')); //進歩状況の表示
readfile('test.zip');
?>