Re: Problems with header()
| From: | Martín Marqués | Date: | Sat, 18 Jun 2005 13:08:56 +0000 |
| Subject: | Re: Problems with header() | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-217171@lists.php.net to get a copy of this message | ||
El Sáb 18 Jun 2005 01:38, Tom Rogers escribió:
>
> Here is a script I use to send pdfs which also handles caching
> information. It may just be you are missing the content-length header?
[snip]
> header("Accept-Ranges: bytes");
> header('Cache-Control: no-cache, must-revalidate');
> header("Content-type: application/pdf");
> header("Content-Length: $len");
> readfile($filename);
Excelent! The Content-length did it. The only thing I don't understand is that
whenever I put the header("Accept-Ranges: bytes") it stops sending the PDF
file. I comment out that line and everything works like a charme.
Thank you!
--
10:06:43 up 11 days, 21:53, 1 user, load average: 2.32, 1.81, 1.35
-----------------------------------------------------------------
Martín Marqués | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica | DBA, Programador, Administrador
Universidad Nacional
del Litoral
-----------------------------------------------------------------