Im using:
header('Content-Type: application/msword;');
header("Content-Disposition: attachment; filename=bill.doc");
readfile($new_file);
To output a dynamically generated word file to a browser. It seems to work fine if you save the file first, but if you just click open, you get a 'cannot open file' error. Any ideas why this might be?
If not, is it possible to force the user to save the file to the drive first and not open it?
Thanks
header('Content-Type: application/msword;');
header("Content-Disposition: attachment; filename=bill.doc");
readfile($new_file);
To output a dynamically generated word file to a browser. It seems to work fine if you save the file first, but if you just click open, you get a 'cannot open file' error. Any ideas why this might be?
If not, is it possible to force the user to save the file to the drive first and not open it?
Thanks