Re: Problems with header()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-----------------------------------------------------------------

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux