<!--#include file="../inc/conn.asp"--> <% Sub repy() Dim ID ID = Trim(Request("id")) Set rs = Server.CreateObject( "ADODB.Recordset" ) Sql ="select spfilename from huitie where id="&request("id") rs.Open Sql, conn, 1, 3 sSavePathFileName=rs("spfilename") rs.Close Dim aSavePathFileName aSavePathFileName = Split(sSavePathFileName, "|") Dim i For i = 0 To UBound(aSavePathFileName) Call DoDelFile(aSavePathFileName(i)) Next Set rs = Server.CreateObject( "ADODB.Recordset" ) Sql ="DELETE FROM huitie WHERE ID="&request("ID") rs.Open Sql, conn, 1, 3 End Sub Sub DoDelFile(sPathFile) On Error Resume Next Dim FSO Set FSO = Server.CreateObject("Scripting.FileSystemObject") FSO.DeleteFile(Server.MapPath(sPathFile)) Set FSO = Nothing End Sub response.redirect("manage.asp") %>