[thelist] copying directories via PHP?!?

Henrik Hansen hh at fsck.dk
Mon Dec 10 16:07:48 CST 2001


On Mon, 2001-12-10 at 22:49, Jason Morehead wrote:
> hey all...
> 
> i'm trying to write a script that will take an existing directory, 
> and copy all of its contents (subdirectories and all) into a new 
> directory.  is there some sort of "cpdir" function, a la "mkdir"? 
> i've been fiddling with a few different ideas, but nothing i've come 
> up with seems to work.  any help/ideas are appreciated.  thanks 
> much...

http://www.php.net/manual/en/function.copy.php

look in the user comments there is a function for just that, just a
recursive function that copies files one by one.

-- 
Henrik Hansen





More information about the thelist mailing list