Page 1 of 1

php ftp

Posted: Mon Feb 07, 2005 5:35 pm
by kassim
Is there anybody out there that can help with the following problem?!
:?:

I need a function that when called will created a directory and two files within that directory. At the same the files must be written to.

Would you need multiple connections or can this be done with just one connection?

Also I need a recursive function that will delete all files within a given directory and then the directory itself.

All this has to be done using php FTP functions. Your help is really appreciated!

Thanks :D

Posted: Mon Feb 07, 2005 5:52 pm
by pickle
1) You're probably going to get more help if you actually try it yourself, and ask about particular difficulties you're having, rather than trying to get someone to do it for you.

2) If you do want someone to do it for you, this should be posted in either the 'Volunteer Work' (free) or 'Job Hunt' (pay someone to do it) forum

Posted: Mon Feb 07, 2005 5:54 pm
by John Cartwright
have you checked

php.net/ftp, php.net/rmdir, php.net/unlink

Posted: Mon Feb 07, 2005 5:54 pm
by feyd
it can be done through a single connection. Although I don't know if you can dynamically write to the files being placed on the server...

As for recursive deleting.. it's fairly simple.. you make a list of all files recursively, unlink() each one, then rmdir() all the folders you passed through grabbing all the files. We've talked multiple times about recursing directory structures..

Posted: Sun Jan 22, 2006 5:36 pm
by kassim
pickle wrote:1) You're probably going to get more help if you actually try it yourself, and ask about particular difficulties you're having, rather than trying to get someone to do it for you.

2) If you do want someone to do it for you, this should be posted in either the 'Volunteer Work' (free) or 'Job Hunt' (pay someone to do it) forum
Thanks, that was very helpful!! (fyi - sarcasm) Attempts were made and eventually it was successful with minor changes to the end product. Please let me know if you need some help too. I have a mail box full of useless replies if required.

My thanks to the other members for their useful input.