asp中的文件删除问题
下面是代码Dim conn
Dim dbpath
Set conn=Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("photo.mdb")
'conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
conn.open "DBQ="&DBPath&";driver={microsoft access driver (*.mdb)}"
Dim name,id
id = Request.QueryString("id")
Set rs = Conn.Execute("SELECT * FROM photo WHERE id="&id)
If Not rs.EOF Then
name=trim(rs("tp_name"))
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
MyFileObject.DeleteFile *********
conn.execute("Delete From photo where id="&id)
End If
response.write("<script language='javascript'>alert('成功删除!');location.href='index.asp';</script>")
%>
问题是删除不了上传的图片,tp_name是图片的名字,与此代码文件的同一目录里,有文件甲pic里面就是放的图片
红色部分应该怎么写啊
感觉绝对路径好象是错的
帮忙了