Posted by vamichael on 05/04/06 01:10
I'm using the following to try and send a file to user, however instead
of getting a "save as" dialog box I'm getting ascii garbage (presumably
the contents of the file) in the browser instead. Can someone please
help? I need the solution to work in both Firefox and IE. Thanks!
<?php
$url="myfile.exe";
header("Content-type: application/octet-stream");
header("Content-Disposition: inline; filename=".basename($url)."");
readfile($url);
?>
[Back to original message]
|