Hi!

Andreas Magnusson wrote:
> I'm writing a script to view/download an email-attachment. If the file
> happens to be an MS Word document and the browser IE (only tried with
> 6.0), then the download fails.
> If I choose to download (Content-Disposition: attachment;
> filename="whatever.doc") then only a part of the file (2/3) is saved
> to disk. Of course viewing the file doesn't work either. It doesn't
> seem to matter what I set the Content-Type to since IE seems to
> ignore that anyway, however I've tried application/msword,
> application/octet-stream and some others. I've tried all the things
> said in the comments to the header-function in the online-docs at
> php.net.
> I know my Content-Length header is correct and the whole procedure
> works great with Netscape 7.0 and if the attachment is a zip-file or
> a jpeg-image it also works in both IE and Netscape.

Have a look at: http://pear.php.net/package/HTTP_Download

And the first comment of:
http://www.php.net/manual/en/function.session-cache-limiter.php

Perhaps you should not use ouput-compression, and look at the headers
generated by PHP

What headers are sent? Do you use sessions?

you can see this using Mozilla + Live Headers, Ethereal,
http://schroepl.net/cgi-bin/http_trace.pl ...


Regards,
Andreas

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to