我用程序创建了一个文件夹,这个文件本应该是在虚拟路径下的,可是它却被保存到了D:\Microsoft Visual Studio 2005\Common7\IDE这个文件夹下,这个文件夹并不是我的虚拟路径。不知道是为什么源代码:
//检测保存文件夹是否存在,不存在,则创建
string path = @".\SaveXML";
if (!System.IO.Directory.Exists(path))
{
System.IO.Directory.CreateDirectory(path);
}
//检测保存文件夹是否存在,不存在,则创建
string path = @".\SaveXML";
if (!System.IO.Directory.Exists(path))
{
System.IO.Directory.CreateDirectory(path);
}
path = Server .MapPath(path)
if (!System.IO.Directory.Exists(path))
{
System.IO.Directory.CreateDirectory(path);
}