asp删除文件函数asp
function delfile(path)
dim fso
set fso=server.CreateObject("scripting.filesystemobject")
if fso.fileexists(server.mappath(path)) then
fso.deletefile(server.MapPath(path))
response.write("成功删除...
function delfile(path)
dim fso
set fso=server.CreateObject("scripting.filesystemobject")
if fso.fileexists(server.mappath(path)) then
fso.deletefile(server.MapPath(path))
response.write("成功删除"&server.mappath(path)&"<br />")
else
response.write(server.mappath(path)&"文件不存在"&"<br />")
end if
fso.close
end function
dim fso
set fso=server.CreateObject("scripting.filesystemobject")
if fso.fileexists(server.mappath(path)) then
fso.deletefile(server.MapPath(path))
response.write("成功删除"&server.mappath(path)&"<br />")
else
response.write(server.mappath(path)&"文件不存在"&"<br />")
end if
fso.close
end function
最新评论
热门推荐
我要评论