Hi
I am trying to force the browser to show the download file dialog box. It all works a treat except for the filename that is shown. It puts in the name of the PHP page as opposed to the filename that I provide. The browser I am using is IE6.
I check that the file exists first.
I have trawled google and others have asked the question but there are no answers that have helped me
Any ideas???? Please help - I'm getting desperate now
Cheers
Rpb
I am trying to force the browser to show the download file dialog box. It all works a treat except for the filename that is shown. It puts in the name of the PHP page as opposed to the filename that I provide. The browser I am using is IE6.
I check that the file exists first.
I have trawled google and others have asked the question but there are no answers that have helped me
Code:
header("Pragma: no-cache");
header("Expires: 0");
header("Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"".$fileName."\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($pathFileName));
Any ideas???? Please help - I'm getting desperate now
Cheers
Rpb