You are here: Re: what is better : readfile, fpassthru, or header(" Location: ...") ? « PHP Programming Language « IT news, forums, messages
Re: what is better : readfile, fpassthru, or header(" Location: ...") ?

Posted by Toby A Inkster on 07/24/07 16:08

andre rodier wrote:

> When I need to display the image, I use this code :
> header("Content-Length: $fileSize") ;
> header("Content-Type: $type") ;
> header("Content-disposition: inline") ;
> header("Location: $imageURL");

The "Location" HTTP header just does a redirect, so there's precious
little use in sending any of those other headers first as the web server
will fill them in automatically when the browser requests the target URL.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 33 days, 19:46.]

Parsing an HTML Table with PEAR's XML_HTTPSax3
http://tobyinkster.co.uk/blog/2007/07/20/html-table-parsing/

 

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

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