public function mkdirr($folder)
    {
        $folders = preg_split("#[\\\\/]#", $folder);
        $base = '';
        for($i = 0, $c = count($folders); $i < $c; $i++) {
            if(empty($folders[$i])) {
                if (!$i) {
                    // special case for root level
                    $base .= DIRECTORY_SEPARATOR;
                }
                continue;
            }
            $base .= $folders[$i];
            if(!is_dir($base)){
                $this->mkdir($base);
            }
            $base .= DIRECTORY_SEPARATOR;
        }
    }
public function mkdirr($folder)
    {
        $folders = preg_split("#[\\\\/]#", $folder);
        $base = '';
        for($i = 0, $c = count($folders); $i < $c; $i++) {
            if(empty($folders[$i])) {
                if (!$i) {
                    // special case for root level
                    $base .= DIRECTORY_SEPARATOR;
                }
                continue;
            }
            $base .= $folders[$i];
            if(!is_dir($base)){
                $this->mkdir($base);
            }
            $base .= DIRECTORY_SEPARATOR;
        }
    }
public function mkdirr ( $ folder ) { $ folders = preg_split ( "#[\\\\/]#" , $ folder ) ; $ base = '' ; for ( $ i = 0 , $ c = count ( $ folders ) ; $ i < $ c ; $ i ++ ) { if ( empty ( $ folders [ $ i ] ) ) { if ( ! $ i ) { // special case for root level $ base .= DIRECTORY_SEPARATOR ; } continue ; } $ base .= $ folders [ $ i ] ; if ( ! is_dir ( $ base ) ) { $ this -> mkdir ( $ base ) ; } $ base .= DIRECTORY_SEPARATOR ; } }
Recursively creates a directory
@param string $folder Name of folder to create
@note Adapted from the PHP manual comment 76612
Recursively creates a directory