fpassthru failure with mozilla

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

 



I'm using fpassthru so users must log in to have access to certain
files. The users are accessing the fpassthru script with an https
connection. The code works fine with IE but sends inline ascii text
with mozilla/firefox. The code looks like this:

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

Any ideas? Everything I've read says with the content type set to
application, and the disposition set to attachment I should be set,
but it doesnt seem to be the case.

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