日期:2014-05-17  浏览次数:20452 次

代码删除文件夹内图片问题
System.IO.FileInfo file = new System.IO.FileInfo("~/imgsc/fzxm03.jpg");
  file.Delete();


路径那里写这个不行,还必须写E:/Mynetkb/imgsc/fzxm03.jpg 我想按照我上面的那种格式写应该怎么写路径啊?
没有多少分

------解决方案--------------------
Server.MapPath()
------解决方案--------------------
找路径一般用Server.MapPath()