if (Directory.Exists(System.Web.HttpContext.Current.Server.MapPath("~/UploadFiles/" + postModel.Pic_Path + "/")) == false)//如果不存在就创建file文件夹 { Directory.CreateDirectory(System.Web.HttpContext.Current.Server.MapPath("~/UploadFiles/" + postModel.Pic_Path + "/")); } path_str = System.Web.HttpContext.Current.Server.MapPath(String.Format("/UploadFiles/" + postModel.Pic_Path + "/{0}", postModel.Pic_Name));
时间: 2024-10-13 17:40:46