asp 删除图片与文件函数
asp 删除图片与文件函数
fso filesystemobject对象的deletefile函数来实现删除,方法简单的,下面我们来看看下面的实例吧。
我们会利用
function delfile(path)
dim fso
response.write(server.mappath(path))
response.end
set fso=server.CreateObject("scripting.filesystemobject")
if fso.fileexists(server.mappath(path)) then
fso.deletefile(server.MapPath(path))
end if
fso.close
end function
- 上一篇:asp 简单数据库连接类
- 下一篇:解决IE8下无法使用编辑器的方法