首页 > 其他 > 详细

一般处理程序中删除文件

时间:2017-06-20 09:32:20      阅读:321      评论:0      收藏:0      [点我收藏+]

int id = Convert.ToInt32(context.Request["id"]);
string sql = "select ImgUrl from Contents where ID=" + id;
string url = (string)SqlHelper.ExecuteScalar(sql);
string path = System.Web.HttpContext.Current.Server.MapPath("images/img/");
url = path + url;
if (File.Exists(url))
{
File.Delete(url);
}

一般处理程序中删除文件

原文:http://www.cnblogs.com/wz9003/p/7052524.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!