problem downloading folder

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
varecha
Forum Newbie
Posts: 4
Joined: Tue Nov 22, 2005 3:34 am

problem downloading folder

Post by varecha »

hi, i would like the admin user of my site to be able to download folders from the domain, for this ive been trying with ftp functions and the ftp wrappers and both work but it seems that there is no way to open a ftp conexion rather than in the domain's root folder, is there a way to ftp connect directly to a subfolder in the domain?

ive been thinking to compress all the files in the folder on to a zip and download it, is this posible? if so, where can i get information?

if anyone knows a good way of downloading the contents of a certain folder it would be greatly appreciated

thanks for your time
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

varecha
Forum Newbie
Posts: 4
Joined: Tue Nov 22, 2005 3:34 am

Post by varecha »

i see, so then i can change the current directory and use opendir, readdir and use ftp_get() to download the files it reads, am i right?

thanks for your reply
varecha
Forum Newbie
Posts: 4
Joined: Tue Nov 22, 2005 3:34 am

Post by varecha »

i have managed to use ftp_chdir to get to the folder i want, then with ftp_nlist i got the files but when i use ftp_get i get "error opening" the local file, sorry for being so persistent but i have a dead line to stick to and time is running out
varecha
Forum Newbie
Posts: 4
Joined: Tue Nov 22, 2005 3:34 am

Post by varecha »

i finally fixed, started again from scratch and the ftp wrappers did the trick, thanks anyway
Post Reply