Hi Friends,
This is tejash patel.
I am getting problem in downloading documents using "header".
On click of download button the page is called itself.
I wrote the following code.
$fp = fopen($name, "rb");
header("Content-type: application/x-download");
header("Content-Disposition: attachment; filename=filename");
header("Content-Transfer-Encoding: binary");
header("Content-Length: $download_size");
fpassthru($fp);
fclose($fp);
exit;
This code is work fine in firefox mozila.
But in IE it creates problem. When is ask for download if i click on "Open" instead of "Save" then it will again as for "Save" or "Open". Now click on open, it will opent the document.
If anyone of your guys have solution of this problem then please reply me as soon as possible.
Thank you.
- Tejash Patel