IE Force Download Issues
Moderator: General Moderators
-
pennythetuff
- Forum Newbie
- Posts: 22
- Joined: Sun Feb 19, 2006 6:05 pm
- Location: Kokomo, Indiana
IE Force Download Issues
I'm having force download issues in IE. I'm forcing the download of a CSV file. Whenever I choose open from the download prompt, and Excel opens I get an error saying that it can't find the file. It works fine in Firefox. It just seems like it's either saving it in one spot and looking for it in another, or it's just not saving it. Thanks in advance.
-
pennythetuff
- Forum Newbie
- Posts: 22
- Joined: Sun Feb 19, 2006 6:05 pm
- Location: Kokomo, Indiana
Here's my code:
Code: Select all
header("Pragma: public");
header("Cache-Control: private", false);
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=\"airvoyance.csv\";");
header("Content-Transfer-Encoding: binary");
readfile($filepath);-
pennythetuff
- Forum Newbie
- Posts: 22
- Joined: Sun Feb 19, 2006 6:05 pm
- Location: Kokomo, Indiana
The problem was I just wasn't paying attention. In the header:
Notice that I have quotes around the filename. I just removed those and it worked fine. Here's the fix:
I guess I'll just have to pay more attention next time. Thanks everyone.
Code: Select all
header("Content-Disposition: attachment; filename=\"airvoyance.csv\";");Code: Select all
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=airvoyance.csv;");
readfile($filepath);