using System.IO;
string directory = "UploadPhotos/"; //在服务器上创建上传图片存储的文件夹 if (!Directory.Exists(Server.MapPath(directory))) //判断存储图片的文件夹是否存在 { Directory.CreateDirectory(Server.MapPath(directory)); //如果不存在,创建它 }
时间: 2025-01-10 20:37:10
using System.IO;
string directory = "UploadPhotos/"; //在服务器上创建上传图片存储的文件夹 if (!Directory.Exists(Server.MapPath(directory))) //判断存储图片的文件夹是否存在 { Directory.CreateDirectory(Server.MapPath(directory)); //如果不存在,创建它 }