forcing directory download from a dir list

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rap_digital
Forum Newbie
Posts: 4
Joined: Mon Jun 04, 2007 11:44 pm

forcing directory download from a dir list

Post by rap_digital »

Hi all,
I'm a php newbie and have been trying to customise this script so that instead of opening a sub-dir it forces downloading the sud-dir. Can anyone help me out?

Thanks in advance
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

rap_digital wrote:it forces downloading the sud-dir
please explain in more detail.
How do you download a directory?
rap_digital
Forum Newbie
Posts: 4
Joined: Mon Jun 04, 2007 11:44 pm

Post by rap_digital »

As you can see with the sample script that with files you get a download button in the generate page I'm hoping to add that action to directories aswell.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

You can't download directories over HTTP. You'll have to zip them or something.
rap_digital
Forum Newbie
Posts: 4
Joined: Mon Jun 04, 2007 11:44 pm

Post by rap_digital »

Duh.....really
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

rap_digital wrote:Duh.....really
:roll:
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

rap_digital
Forum Newbie
Posts: 4
Joined: Mon Jun 04, 2007 11:44 pm

Post by rap_digital »

Cheers, the reason I'm try to do this is to avoid zip files. One of my clients cant download zip files due to over protective IT department. My current solution is to give her an apple automator app that ftp's in to the server and downloads the file using the command line. This works OK but as there is no real progress bar she sometimes tries opening the file before its complete. I may try giving them cyberduck and an applescript.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I don't remember if it's possible or not, but a multi-part page may be able to push multiple files in a single request (sequentially.) You will have to engineer the headers to send the proper information so her browser can accurately render a progress bar however.
Post Reply