Dronealone
IS-IT--Management
Hello,
the age old problem of forcing files to download is coming back to haunt me.
I'm runing authentication scripts through a wrapper file which then sends the headers to download the file.
I send the following headers:
for IE:
header("Content-length: " . $db_row['file_size'] . "\n"
;
header("Content-Type: application/octet-stream\n"
;
header("Content-Disposition: atachment; filename=\"$filename\""
;
and this works for nearly all apart from IE5.5 SP1
for Netscape 6:
header("Content-length: " . $db_row['file_size'] . "\n"
;
header("Content-Type: " . $db_row['file_type']);
header("Content-Disposition: atachment; filename=\"$filename\""
;
However Netscape 7 will not work with either of these configs, it insists on adding the .php extension to the file name in the save as box, and selects file types of php.
Does anybody have any ideas how to sort this one out, I've searched all over the place and am tearing my hair out!!!
Thanks
the age old problem of forcing files to download is coming back to haunt me.
I'm runing authentication scripts through a wrapper file which then sends the headers to download the file.
I send the following headers:
for IE:
header("Content-length: " . $db_row['file_size'] . "\n"
header("Content-Type: application/octet-stream\n"
header("Content-Disposition: atachment; filename=\"$filename\""
and this works for nearly all apart from IE5.5 SP1
for Netscape 6:
header("Content-length: " . $db_row['file_size'] . "\n"
header("Content-Type: " . $db_row['file_type']);
header("Content-Disposition: atachment; filename=\"$filename\""
However Netscape 7 will not work with either of these configs, it insists on adding the .php extension to the file name in the save as box, and selects file types of php.
Does anybody have any ideas how to sort this one out, I've searched all over the place and am tearing my hair out!!!
Thanks