I have a file that I would like to force the browser to prompt the user to download it. It keeps displaying the file in the browser here is the code.
<?php>
header("Content-Type: application/msword");
header("Content-Disposition: attachment; filename=ws_ftple.doc");
$data = @file("/home/www/library/temp/ws_ftple.doc");
$i=0;
while ($data[$i]) {
print($data[$i++]);
}
//print $data;
?>
Also tried the readfile("filename") and got the same results. Changed the content type to "application/octetstream" and got the same results.....
Any thoughts??
Jay