string a = "http://localhost/INTEPLM_files/";
HttpContext h = HttpContext.Current;
h.Server.MapPath(a);运行这段代码时,报未将对象引用到实例错误。我主要是想在服务器端创建文件夹,但是不知道如何获取服务器端的物理路径,请高人指点
HttpContext h = HttpContext.Current;
h.Server.MapPath(a);运行这段代码时,报未将对象引用到实例错误。我主要是想在服务器端创建文件夹,但是不知道如何获取服务器端的物理路径,请高人指点
string UpFilesDir = "uploadImage/" + CurrUser + "/";
string myPath = Server.MapPath(UpFilesDir);
if (!System.IO.Directory.Exists(myPath))
System.IO.Directory.CreateDirectory(myPath);
创建的文件夹只能在你的网站目录以下,不能在网站根目录以外的地方创建的