Re: Finally, PDF Header for PDF stuffs that work....

From: Date: Tue, 14 Oct 2003 21:33:42 +0000
Subject: Re: Finally, PDF Header for PDF stuffs that work....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-166119@lists.php.net to get a copy of this message
* Thus wrote Scott Fletcher (scott@abcoa.com): > //Can't use readfile() due to poor controlling of the file download. > //(IE have this problems)... > //readfile($filepath); readfile has no effect on how IE handles downloads. > > //use fopen() instead of readfile... > $fp = fopen($filepath, 'rb'); > $pdf_buffer = fread($fp, $filesize); > fclose ($fp); > > print $pdf_buffer; Loading the whole file in memory and not doing anything with it before sending it to the client doesn't make much sense. > > //Required, to keep IE from running into problems > //when opening the file while downloading or downloading... > //(IE been acting strange...) > exit(); This also doesn't effect IE. Curt -- "My PHP key is worn out" PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/

« previous php.general (#166119) next »