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 |
|
|||
|
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. |
|
|
|
||||
|
Re: Creating a download link
hmmm ... a simple link would do?!
|
|
|||
|
Re: Creating a download link
That worked for me.
Thanks Karinne! |
|
|||
|
Re: Creating a download link
Do you know where I can find any useful tutorials that explains how to do this?
|
|
||||
|
Re: Creating a download link
|
|
|||
|
Re: Creating a download link
Thanks a lot for that, Ryan!
I will try and learn some php soon. |
|
||||
|
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. |
|
|||
|
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 | 3 | Dec 9th, 2007 16:09 |
| 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 |