Rado001 Posted December 14, 2009 Share Posted December 14, 2009 Hi, I have issues with downloading a CSV file in IE (firefox works just fine). I know this is an ongoing issue as there are so many forum questions about this, but none seem to have a working solution. Are there any more recent updates to this known issue? I've included my header code below ... // fix for IE catching or PHP bug issue header("Pragma: public"); header("Expires: 0"); // set expiration time header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header('Content-Disposition: attachment; filename="'.basename($filename).'"'); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".@filesize($filename)); echo $contents; mysql_free_result($results); } Any poiters would be appreciated. Rado Quote Link to comment https://forums.phpfreaks.com/topic/185107-problems-downloading-excel-files-in-ie/ Share on other sites More sharing options...
mrMarcus Posted December 14, 2009 Share Posted December 14, 2009 I have issues with downloading a CSV file in IE (firefox works just fine). I know this is an ongoing issue as there are so many forum questions about this, but none seem to have a working solution. Are there any more recent updates to this known issue? I've included my header code below ... // fix for IE catching or PHP bug issue my psychic powers are running a little low this morning. you're going to have to actually inform me as to what the issue is this time. Quote Link to comment https://forums.phpfreaks.com/topic/185107-problems-downloading-excel-files-in-ie/#findComment-977147 Share on other sites More sharing options...
.josh Posted December 14, 2009 Share Posted December 14, 2009 this is what I use and it prompts for download for me..dunno if that's what you are shooting for or what though..as ^ mentioned, it helps if you actually mention what the problem is header('Content-type: application/vnd.ms-excel'); header('Content-Disposition: attachment; filename=filenamehere.csv'); Quote Link to comment https://forums.phpfreaks.com/topic/185107-problems-downloading-excel-files-in-ie/#findComment-977150 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.