This is a discussion on "Creating a download link" within the Starting Out section. This forum, and the thread "Creating a download link are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Creating a download link
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Creating a download link
Hello.
I was wondering how you create a download link. For example if someone wanted to download a (X)HTML and CSS file that was zipped up, how would I code this. Thanks, Padraig. |
|
|
|
#2
|
|||
|
|||
|
Re: Creating a download link
hmmm ... a simple link would do?!
|
|
#3
|
|||
|
|||
|
Re: Creating a download link
That worked for me.
Thanks Karinne! |
|
#4
|
||||
|
||||
|
Re: Creating a download link
If you don't want to zip it, you can force a browser to download a file using PHP (ie, like an HTML page that a browser would normally try to render).
|
|
#5
|
|||
|
|||
|
Re: Creating a download link
Do you know where I can find any useful tutorials that explains how to do this?
|
|
#6
|
||||
|
||||
|
Re: Creating a download link
|
|
#7
|
|||
|
|||
|
Re: Creating a download link
Thanks a lot for that, Ryan!
I will try and learn some php soon. |
|
#8
|
||||
|
||||
|
Re: Creating a download link
No problem. To use that script, put it in an empty text file with the extension .php. If you link to that file in a browser, it will download whatever file is referenced in the first couple of lines.
Just be careful with it, though. Don't leave it open ended where someone can choose a file to download anywhere on your server. That PHP script can access anything on your server, regardless of whether it's in a password protected directory or out of your root directory. |
|
#9
|
|||
|
|||
|
Re: Creating a download link
I'll definetly have a look at some php tutorials before trying something like this. I'll save that script to my computer in the mean time. Thanks again for the help and the script.
Pádraig. |
![]() |
| Tags |
| download, how to, link |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Download button - to download a PDF file | attila001122 | Web Page Design | 4 | Aug 15th, 2008 11:44 |
| order confirmation email download link | Aaron1988 | PHP Forum | 0 | Sep 25th, 2006 20:03 |
| Need help creating live web page changes when user clicks a link | dannyboy | Other Programming Languages | 2 | Feb 5th, 2006 11:43 |
| creating a link to an ftp web site | wat55up74 | Web Page Design | 2 | Feb 1st, 2006 04:31 |