I have googled this issue and it seems like that IE throws this error for HTTPS (SSL) URLs. microsoft support page says that it can happen if you have any of the following headers:
In my code I don't have these headers, but when I print the headers from PHP these get included automatically, I also tried to use unset() to get rid of them but still no luck, any help is appreciated. Here is my code below:Pragma: no-cache
Cache-control: no-cache,max-age=0,must-revalidate
Code: Select all
header("Content-Disposition: attachment; filename=$filename");
header("Content-Type: application/vnd.ms-excel");
echo $data;