----- Original Message -----
From: "Philip Hallstrom" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, May 15, 2001 7:01 PM
Subject: Re: [PHP] Recursively create directories


> >
> >foreach($dir_array as $current_dir) {
> >   if(! is_dir($DOCUMENT_ROOT."/".$current_dir) ) {
> >      mkdir($DOCUMENT_ROOT."/".$current_dir,0700);
> >   }
> >}

Here's my appraoch:

            if( ! @is_dir( $this->cachedir)) {
                $dirs = split( '/', $this->cachedir);
                $createdir = '';
                foreach( $dirs as $dir) { $createdir .= '/' . $dir;
@mkdir( $createdir, 0775);}
            }

HTH
- Markus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to