Hello, i have a PHP script that will pop up a save as dialog box.
This script works well at Firefox and IE7, but when i test it with Safari for Windows.
It will download the PHP script itself and not the file that i want to give to user.
Can someone help me, pls? Thanks in advance....
[code=php]
header("Content-disposition: attachment; filename=".$fil eName);
header("Content-type: application/octet-stream");
header("Pragma: no-cache");
header("Expires : 0");
$fp = fopen("$fileLoc ","r");
$str = fread($fp, filesize($fileL oc));
echo $str;
fclose($fp);
[/code]
This script works well at Firefox and IE7, but when i test it with Safari for Windows.
It will download the PHP script itself and not the file that i want to give to user.
Can someone help me, pls? Thanks in advance....
[code=php]
header("Content-disposition: attachment; filename=".$fil eName);
header("Content-type: application/octet-stream");
header("Pragma: no-cache");
header("Expires : 0");
$fp = fopen("$fileLoc ","r");
$str = fread($fp, filesize($fileL oc));
echo $str;
fclose($fp);
[/code]
Comment