I have a php-page with some links to download files. One of the links is this one:
<a href="downldpg.php?filename=test.HDR_ENVI">test</a>
This is the code from my downldpg.php page.
<?php
// 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"
;
// browser must download file from server instead of cache
// force download dialog
header("Content-Type: application/force-download"
;
header("Content-Type: application/octet-stream"
;
header("Content-Type: application/download"
;
// downloading a file
$filename = $_GET['filename'];
// use the Content-Disposition header to supply a recommended filename and
// force the browser to display the save dialog.
header("Content-Disposition: attachment; filename=".basename($filename).";"
;
header("Content-Transfer-Encoding: binary"
;
header("Content-Length: ".filesize($filename));
readfile("$filename"
;
exit();
?>
I get the save dialog box. When I choose cancel or open everything works fine. When I choose save, my website blocks, i can't go to an other page anymore??? I work with IE6, can anyone help me???
<a href="downldpg.php?filename=test.HDR_ENVI">test</a>
This is the code from my downldpg.php page.
<?php
// fix for IE catching or PHP bug issue
header("Pragma: public"

header("Expires: 0"

header("Cache-Control: must-revalidate, post-check=0, pre-check=0"

// browser must download file from server instead of cache
// force download dialog
header("Content-Type: application/force-download"

header("Content-Type: application/octet-stream"

header("Content-Type: application/download"

// downloading a file
$filename = $_GET['filename'];
// use the Content-Disposition header to supply a recommended filename and
// force the browser to display the save dialog.
header("Content-Disposition: attachment; filename=".basename($filename).";"

header("Content-Transfer-Encoding: binary"

header("Content-Length: ".filesize($filename));
readfile("$filename"

exit();
?>
I get the save dialog box. When I choose cancel or open everything works fine. When I choose save, my website blocks, i can't go to an other page anymore??? I work with IE6, can anyone help me???