PHPでファイルのダウンロード
![mocadlogo](https://moca-d.com/wp-content/themes/mocad7/images/pg_no-img.png)
PHPでファイルをダウンロードさせるサンプル。
・http://phpspot.org/blog/archives/2008/02/phpdlphp.html
<?php
header(‘Content-Type: application/octet-stream’);
header(‘Content-Disposition: attachment; filename=”dl.zip”‘);
header(‘Content-Length: ‘.filesize(‘dl.zip’));
readfile(“dl.zip”);
?>