Wednesday, April 4, 2012

Downloading files using PHP

Put the file you wish to download in your website directory. Example:
/file.rar

Now when you want to download it just go http://mysite.com/file.rar

It's that simple, don't over complicated it and you don't need PHP. Yesterday I tried to figure out how to download files but ran across all kinds of complicated methods. Using HTTP heaters, download helper; force_download in codeigniter, and PEAR. Maybe the reason I had such a hard time finding the solution was because its too obvious. Shot! I personally missed it.

No comments:

Post a Comment