|
Posted by Chuck Anderson on 08/17/06 20:06
Pablito wrote:
> At last I used this:
>
> <?
> $File="newspaper.pdf";
> ini_set('zlib.output_compression','Off');
> header("Pragma: public");
> header('Expires: ' . gmdate('D, d M Y H:i:s', time()+24*60*60) . ' GMT');
> header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
> header("Cache-Control: must-revalidate");
> header("Content-type: application/pdf");
> header("Content-Length: ".filesize($file));
> header("Content-disposition: inline; filename=$file");
> header("Accept-Ranges: ".filesize($file));
> readfile($file);
> exit();
> ?>
>
> that do not work like others
>
> Pablito
>
>
>
Is this still a question?
If so, here's what works for me:
header('Content-Description: File Transfer');
header('Content-Type: application/pdf');
header('Content-Length: ' . filesize($file));
header('Content-Disposition: attachment; filename=' . basename($file));
readfile($file);
--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
*****************************
Navigation:
[Reply to this message]
|