Re: fpassthru failure with mozilla

From: Date: Tue, 12 Oct 2004 16:17:30 +0000
Subject: Re: fpassthru failure with mozilla
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-199264@lists.php.net to get a copy of this message
Why use fpassthru? I just use readfile, is there a difference? On Tue, 12 Oct 2004 11:11:54 -0500, Matt M. <h.dudeness@gmail.com> wrote: > > $filepath = "bla/bla/files/"; > > $filename = "file.zip"; > > $fullpath = "$filepath/$filename"; > > > > header( ' Pragma: '); > > header( ' Content-Type: application/force-download' ); > > header( ' Content-Type: application/octet-stream ' ); > > header( ' Content-length:'.(string)(filesize($fullpath))); > > header( ' Cache-Control: private' ); > > header( " Content-Disposition: attachment; filename='$filename'"); > > > > $fh = fopen("$filepath/$filename", "rb"); > > fpassthru($fh); > > it looks good to me. You might want to try: header('Pragma: > no-cache'); instead of header( ' Pragma: '); > > Also, install http://livehttpheaders.mozdev.org/ on mozilla. > Will > help with debugging > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- <<-------------------------------------------------------- Jasper Howard - Database Administration ApexEleven.com 530 559 0107 ------------------------------------------------------->>

« previous php.general (#199264) next »