Jump to content

Recommended Posts

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

 

Link to comment
https://forums.phpfreaks.com/topic/185107-problems-downloading-excel-files-in-ie/
Share on other sites

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.

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');

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.