循环建立目录,多服务器可以自动同步
boolean Core_File::create_dir( string $dir [, boolean $auto_create_default_file = bool true , string $storage = string(7) "default" ] )
参数列表
参数 类型 描述 默认值 $dirstring待创建的文件夹 $auto_create_default_fileboolean新创建的文件夹,是否自动创建空默认页 bool true $storagestring物理存储组,不传则为默认 string(7) "default" 
boolean true/falsepublic static function create_dir($dir, $auto_create_default_file = true , $storage = 'default')
{
    $info = File::check_and_get_path($dir);
    if (File::can_do_run($storage))
    {
        if (!is_dir($dir))
        {
            if ( substr($dir,0,strlen(DIR_SYSTEM))==DIR_SYSTEM )
            {
                $temp = explode('/', str_replace('\\', '/', substr($dir,strlen(DIR_SYSTEM)) ) );
                $cur_dir = DIR_SYSTEM;
            }
            else
            {
                $temp = explode('/', str_replace('\\', '/', $dir) );
                $cur_dir = '';
            }
            for($i = 0; $i < count($temp); $i++)
            {
                $cur_dir .= $temp[$i] . '/';
                if (!@is_dir($cur_dir))
                {
                    if (@mkdir($cur_dir, 0755))
                    {
                        if ($auto_create_default_file)File::create_file($cur_dir.'index.html', ' ');
                    }
                    else
                    {
                        return false;
                    }
                }
            }
        }
        return true;
    }
    else
    {
        return File::call_http_host($storage, 'file/create_dir', $info[0], $info[1], $auto_create_default_file);
    }
}