Unable to open files from the file download prompt

L

lazloTurbine

I have a site that allows users to download either a txt file or an
excel file.

I'm using the same code in a number of places. The code works fine in
some places. In one instance the code will not let you open the file
directly from the internet. When I try to open the file I get the
following error:

"<file path/file name> could not be found. Check the spelling of the
file name , and verify that the location is correct..."

The interesting thing is that this only occurs on certain PCs. I can
use the site on another PC and am able to open the file fine.

This is literally a copy of existing code. I can't understand why a) it
works in certain places on my site but not in others and b) it works on
certain instances of IE.

Both instances of IE are IE6.

Anyone have any ideas?
 
L

lazloTurbine

Just as a follow up...I added the following headers and things appear
to be working well now.

header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header ("Last-Modified: " . gmdate("D,d M YH:i:s") . " GMT");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
header ("Content-type: application/x-msexcel");
header ("Content-Disposition: attachment; filename=\"" . $filename .
"\"" );
header ("Content-Description: PHP/INTERBASE Generated Data" );
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top