Page 1 of 1
Folder prompt
Posted: Thu Aug 12, 2004 5:45 pm
by dayhuffb
I have created a php page which logs into a remote ftp server, and downloads which ever files the user chooses. I'm trying find a way for the user to select what folder they would like the files downloaded to. I came acrossed, "header("Content-Disposition: attachment; filename=file.txt");", but that requires the user to browse for every file they want to download. I want to browse only once for a folder to place all the files into. I would just place a text box on the form, but browsing would not only be much easier for the user, but also cut down on typos. Is there anything in PHP which does this?
Thanks in advance
~Brad
Posted: Thu Aug 12, 2004 6:06 pm
by feyd
outside of packaging all the files into a zip or other archive, your users will have to download each file individually... that's if you want your users to download the files onto their machine. If you want to download the files onto the server, that's a different story. That would be accomplished by just looping through the files/folders you wish to get the ftp server in your script..
Posted: Thu Aug 12, 2004 7:09 pm
by dayhuffb
Thank you for the quick reply. Do you know of any web languages which enable you to download multiple files at once without zipping the files? Or is this just a universal limitation of web programming?
Thanks Again
Posted: Thu Aug 12, 2004 7:19 pm
by feyd
it's a security risk to allow a web page access to your file system. The browser would have to support multiple file saves, of which, I know none that support such a feature for downloading..