PHPでダウンロード・出力機能
通常ダウンロードは特に問題なかったと思いますが、SSL環境でのダウンロード(PDF)でたまたま詰まっている人が居たので、下記のように。
ま、ダウンロードに困ったときは、#!/usr/bin/perlぐらいの勢いでおまじないと思ってればいいのかもね。
header("Content-Type: application/pdf"); header("Content-Disposition: inline; filename=" . $filename . ".pdf"); header("Content-Transfer-Encoding: binary"); header("Expires: 0"); // Microsoft Internet Explorer if( strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE')) { header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Pragma: public"); } else { header("Pragma: no-cache"); } header("Content-Length: $len");