Re: rec_copy

From: Date: Thu, 14 Mar 2002 04:34:44 +0000
Subject: Re: rec_copy
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-88433@lists.php.net to get a copy of this message
On Thursday 14 March 2002 11:37, jtjohnston wrote: > You might have seen a version of this function: > > http://www.php.net/manual/en/function.copy.php > > I would like to rework this line: > > mkdir($to_path, 0777); > > where mkdir will ignore $to_path if > the directory already exists. I have already tried this: > > #if(!mkdir($to_path, 0777)) > # {mkdir($to_path, 0777);} > > but that doesn't work. I suppose that is because the > function calls itself when it creates sub-directories. Can't you just check whether the directory exists before calling mkdir()? is_dir() -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* The good (I am convinced, for one) Is but the bad one leaves undone. Once your reputation's done You can live a life of fun. -- Wilhelm Busch */

« previous php.general (#88433) next »