文件删除的问题 假设有路径/Upload/image/IMG_0217.jpg(路径是从数据库读出来的),现要根据这个路径在网站后台删除这张图片,该怎么实现? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string path = @"Upload/image/IMG_0217.jpg";path = Server.MapPath(path);System.IO.File.Delete(path); string path = @"Upload/image/IMG_0217.jpg";path = Server.MapPath(path);System.IO.File file=new System.IO.File()if(file.Exit(path)){ System.IO.File.Delete(path);} File.Exists(path) 要先判断一下有没有该文件在Delete 把Upload文件夹放在web.config文件中配置会灵活的。 treeview节点图片无法显示 插入音乐 想做个聊天开发,有高人推荐几种无刷新技术么? asp.net(C#)办公自动化系统开发实例导航电子版谁有? 两种奇怪病毒,那个知道是什么病毒? 请.net前辈指点!!!! 本页两个代码块之间的变量传递问题。 在.NET2003里怎样实现DataGrid水晶报表打印 WEB程序的?在线等!望高手速度解决!谢谢!急!急!急!!! 为什么提示: 试图运行项目时出错:无法在web服务器上启动调试。未将项目配置为进行调试。 我该怎么设啊 treeView 关闭非当前结点 会发图片的进来下 急求简单正则一个,SOS ----¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥
path = Server.MapPath(path);
System.IO.File.Delete(path);
string path = @"Upload/image/IMG_0217.jpg";
path = Server.MapPath(path);
System.IO.File file=new System.IO.File()
if(file.Exit(path))
{
System.IO.File.Delete(path);
}