You are here: Re: [PHP] Problems with header() « PHP « IT news, forums, messages
Re: [PHP] Problems with header()

Posted by Martn Marqus on 06/18/05 16:08

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация