asp 文件删除

2019-04-15 13:57发布


'删除图片

Set fdel = CreateObject"Scripting.FileSystemObject")
pic = trim(rs1("coupon_pic"))
pic_file = "../../images/conpon_pics/"&pic'取得图片当前路径

if pic_file <> "nothing.gif" then
tempImageDir = server.MapPath(pic_file)
If (fdel.FileExists(tempImageDir)) Then
fdel.DeleteFile(tempImageDir)
end if
end if


set fdel=nothing