Can someone please, please help.
I am writing several apps that require a forced download of files.
I have tens of examples that work on PC but everyone of them displays the file in the browser on Macintosh i.e.
The current code I am using is:
<?
if($filename){
$fname="../$drive/lo/$filename"."lo.jpg";
$name=$filename."lo.jpg";
$fp = fopen($fname, "r");
$contents = fread($fp, filesize($fname));
fclose($fp);
header("Content-type: application/RFC822");
header("Content-Disposition: attachment; filename=$name");
header("Content-Transfer-Encoding: binary");
print($contents);
exit;
}
%>
I really need to solve this as many of the end-users will be Mac based.
I would greatly appreciate any help.
Thanks,
Leigh