RE: [PHP] IE can't download, FF can: SSL ? Need special headers?
| From: | Ford, Mike | Date: | Tue, 26 May 2009 10:55:30 +0000 |
| Subject: | RE: [PHP] IE can't download, FF can: SSL ? Need special headers? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-293158@lists.php.net to get a copy of this message | ||
On 22 May 2009 20:41, Dee Ayy advised:
> That's what I had in my first post. What are the rest of
> your headers?
>
> This is what is now deployed and I consider this issue resolved, but
> allowing spaces in the filename across IE, FF, and Safari browsers
> would be the real solution.
Haven't tried this, but does URL encoding spaces with %20 rather than +
help any? If so, you might want to consider using rawurlencode().
> It's untested on other browsers:
>
> header('Content-Description: File Transfer');
> header('Content-Type: '.$type);
> header('Content-Disposition: attachment;
> filename='.basename(str_replace(' ', '_', $name)));
> header('Content-Transfer-Encoding: binary');
> header('Expires: 0');
> header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
> header('Pragma: public'); header('Content-Length: '.$size);
> echo $data;
Cheers!
Mike
--
Mike Ford, Electronic Information Developer,
C507, Leeds Metropolitan University, Civic Quarter Campus,
Woodhouse Lane, LEEDS, LS1 3HE, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 812 4730
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm