揮発性のメモ2

http://d.hatena.ne.jp/iww/

ダウンロードとか

        header("Content-Type: application/octet-stream"); 
        header("Content-Disposition: inline; filename=$filename");
//      header("Content-Disposition: attachment; filename=$filename");
        header("Content-Length: ". strlen($csvfile));
        print($csvfile);
        ob_flush();
        flush();
        
        exit();

inlineだとブラウザの中で開きattachmentだとブラウザの外で開く