I wanted to provide download option to download a file in PHP.
I got following code on net as follows:
Need to create 2 files:
1. display file:
The following code slh be present in it Download my huge document (PDF)
2. download file:
header(‘Content-disposition: attachment; filename=wrar371.exe’);
header(‘Content-type: application/exe’);
readfile(‘wrar371.exe’);
wrar371.exe is the file i am downlaoding.
Now run the display file.
ref : http://webdesign.about.com/od/php/ht/force_download.htm
thanx & regards
Filed under: General
