当前位置:编程学习 > asp >>

文件删除函数

答案:<%
'文件删除函数
function deletefile(filename)
if filename<>"" then
set fso=server.CreateObject("scripting.filesystemobject")
if fso.FileExists(filename) then
fso.DeleteFile filename
else
Response.Write "<script>alert('该文件不存在');</script>"
end if
end if
end function

strfile=server.MapPath("fileName")
deletefile(strfile)
%>

上一个:最近开发一个小型的OA
下一个:表情发布(类似QQ表情)和UBB类(c#)

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,