Re: fpassthru failure with mozilla

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

 



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


[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