如何才能把上传的图片删除?
<%
'----------------删除信息开始------------------'
If Request.QueryString("del_id")<>"" Then
del_id=Request.QueryString("del_id")
Set rs=Server.CreateObject("ADODB.RecordSet")
'----------------删除图片------------------'
Sqlstr="Select * from Person where id="&del_id
Set Rs=Conn.Execute (Sqlstr)
If Not Rs.Eof And Rs.Bof Then
Picture=Rs("Picture")
Line="/"
Set Fso = CreateObject("Scripting.FileSystemObject")
Filepath=Server.Mappath("../upfile_picture/")
SourceFile=Filepath&Line&Picture
If Fso.fileExists(SourceFile) Then
Fso.DeleteFile(SourceFile)
End If
Set Fso = Nothing
End If
Set Rs0=Nothing
'------------------删除记录--------------------'
Sql_del="Delete From Person Where id="&del_id
Conn.Execute (Sql_del)
End If
'--------------------------删除信息结束-----------------------------'
rs.Close
Set rs=Nothing
conn.Close
Set conn=Nothing
Response.Write("<SCRIPT language=JavaScript>javascript:history.go(-1)</SCRIPT>")
Response.Redirect "Person_manger.asp"
%>
路径都对的,就是不知道为什么还是删不掉文件夹里的图片,请各位帮忙~~~~~~
关于删除上传的图片的问题