Hi All,
I've been searching for hours a nice script letting me pop up a download window for .htm and .php, without them being interpreted by the user's browser.
Some code works in NS4 and IE 5, but none of what I found works properly in IE 5.5 : the best I could manage to get has been :
<?/*
$path = "/whatever/test/";
$fp = fopen($path.$file,"rb");
$fsize = filesize($path.$file);
header("Content-type: application/force-download");
header("Content-disposition: attachment; filename=$path.$file");
header("Content-type: text/html");
header("Content-Transfer-Encoding: binary");
$result = fpassthru($fp);
exit;
?>
Problem is, it gives my a nasty "download" name for any file in the dialog box, which comes in fact from my "download.php" file (the file content IS my .htm, though).
Has anyone in the php community developed a handy cross-browser script that works correctly with all, and .htm file download ?
Thanks in advance for your help.