File.Delete(Server.MapPath("../upload/aa.rar"));
引用 8 楼 wuyq11 的回复:string path=Server.MapPath("~/upload/aa.rar")); if (File.Exists(path)) File.Delete(path); 提示错误:上下文中不存在File
string path=Server.MapPath("~/upload/aa.rar")); if (File.Exists(path)) File.Delete(path);
C# code System.IO.File.Delete(Server.MapPath("../upload/aa.rar"));
C# codeFileInfo fi=new FileInfo(Server.MapPath("../upload/aa.rar")); fi.Delete();
System.IO.File.Delete(Server.MapPath("../upload/aa.rar"));
FileInfo fi = new FileInfo(Server.MapPath("../upload/aa.rar")); fi.Delete();
111,120
社区成员
642,541
社区内容
加载中
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧