Jump to content

How can I?


amalosoul

Recommended Posts

Make a link to it in your html:
[code]
<a href="http://www.yoursite.com/file/path/filename.ext">Download this file</a>
[/code]

I know that's not the answer you're looking for, but your question was rather vague.  Why don't you be a little more specific about how you're deciding what files to offer for download or some source code.

It's like joining an automobile enthusiasts forum and saying, "How do I build a car?"  Well, lots of ways.
Link to comment
https://forums.phpfreaks.com/topic/23465-how-can-i/#findComment-106463
Share on other sites

Well, for example I have an archive and when you hit a link I want the browser to display where on my computer I want to download that archive (c:\ or d:\ etc) - maybe even to be able to create a folder on the remote machine where to copy that archive...
I hope that this information is sufficient...
Link to comment
https://forums.phpfreaks.com/topic/23465-how-can-i/#findComment-106474
Share on other sites

The functionality of creating folders on the client machine is usually available through the Save dialog box anyways.

Creating a link to download a file is as simple as creating the [code]<a href></a>[/code] that I gave you above.  If there's multiple items you want to offer for download, you have to create a bunch of those links, one for each item.

The thing that differs is how you build the list.  If you have 100 files you want to offer for download, you certainly don't want to type that out 100 times.  And you certainly want it to stay up to date with which archives are actually valid and available for download.

We can help you do that, but not without you being more specific about where these files are stored, how your website "knows" about them, etc.
Link to comment
https://forums.phpfreaks.com/topic/23465-how-can-i/#findComment-106522
Share on other sites

Well, I have tried using a href but all it does is to open the file:).
I have a text document http://myhost.com/location/file.txt
and when I write <a href="http://myhost.com/location/file.txt">Click</a> it simply opens that text file
it does not try to download it to the remote machine...
Thank you roopurt18 for your pacience, and thorpe for providing me that useful piece of information (I think I will start learnig Java to compensate for these things)...
Link to comment
https://forums.phpfreaks.com/topic/23465-how-can-i/#findComment-107939
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.