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 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php