[ciapug] fpassthru file download

Matthew Nuzum newz at bearfruit.org
Wed Dec 5 15:55:01 CST 2007


On Dec 5, 2007 3:33 PM, Barry Von Ahsen <barry at vonahsen.com> wrote:

> so I had to revisit this, and it seems a lot of people have this
> problem, but haven't found a solution.
>
> I want users to download a file that preferably lives outside of the
> webroot.  it works fine in FF and IE7, but IE6 won't pick up the file
> name I specify, it wants to name it my page name (download.php) - I
> accept that IE6 SP2 will force a download, I just want the name to be
> right.  anybody fixed this?
>
>
Here's my code:

// now we need to download the file
//header("Content-Type: application/ms-x-download");
header("Content-Type: application/octet-stream");
header("Content-Length: $size");
header("Content-Disposition: attachment; filename=\"$name\"");
header("Content-Transfer-Encoding: binary");

-- 
Matthew Nuzum
newz2000 on freenode
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/ciapug/attachments/20071205/a322caa3/attachment.htm


More information about the ciapug mailing list