Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from d3_article where ArticleID in ("&ArticleID&")"
rs.Open sql,conn,1,1
do while not rs.eof
UploadFiles=Split(rs("UploadFiles"), "|")
For i = 0 To UBound(UploadFiles"&p&")
if i<=ubound(UploadFiles) then
DeleteFile(UploadFiles(i))
end if
Next
rs.movenext
loop
Rs.Close
Function DeleteFile(FileName)
FileName=server.MapPath(FileName) '必须转换成绝对路径的
dim Fs
Set fs = CreateObject("Scripting.FileSystemObject")
if FileName<>"" then
if fs.fileexists(Filename)= true Then'图片存在时删图片
Set thisfile = fs.GetFile(Filename)
thisfile.Delete True
end if
end if
Set Fs = nothing
End Function
那里出问题了