copy directory on server??

This has me a little stumped. Is there a way to copy a whole directory on the server, i.e. make a duplicate of it?

copy() reports a permissions error because the directory has files inside it. permissions aren’t a problem because I can happily delete directories even if they have files in, just not copy, apparently.

Is there a simple duplication method, or will I have to do it the long way with mkdir() and by copying over each and every file?

Thanks in advance.

I am not sure if there is a specific PHP function that will do what you ask (maybe Bane might know), however you could try using the shell_exec command and run it that way.

Thanks, I’ll check it out.

Sponsor our Newsletter | Privacy Policy | Terms of Service