views:

67

answers:

2

I have a download page where i have kept musics, pictures, ebooks and etc. Whenever users click at the image it opens it, and same things happen with .pdf files if the user has installed pdf reader on their PC?

I dont want them to open the file but to download it? Any ideas

+1  A: 

header('Content-disposition: attachment; filename=NAME_OF_YOUR_FILE');

ThiefMaster
+1  A: 

You have to add a header to force the download.

http://www.ryboe.com/tutorials/php-headers-force-download

Elph