土
土土
Unregistered / Unconfirmed
GUEST, unregistred user!
下面是我的全代码,看看帮我。我要晕了。
<!--#include file="pans.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql1="select * from com where id like '"&request("id")&"'"
rs.open sql1,conn,3,3
if not rs.eof then
'先删除图片
set objtools=server.createobject("mswc.tools")
if objtools.fileexists("comimg/"&rs("imgadd"))=-1 then
'是否为空
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
fpath=server.mappath("comimg/"&rs("imgadd"))
Set f2 = objFSO.GetFile(fpath)
f2.Delete
'---------------这里有误
end if
Set objFSO = Nothing
end if
'删除整条记录
set rs=server.createobject("adodb.recordset")
sql="delete * from com where id like '"&request("id")&"'"
rs.open sql,conn,3,1
response.redirect "commake.asp"
%>
<!--#include file="pans.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql1="select * from com where id like '"&request("id")&"'"
rs.open sql1,conn,3,3
if not rs.eof then
'先删除图片
set objtools=server.createobject("mswc.tools")
if objtools.fileexists("comimg/"&rs("imgadd"))=-1 then
'是否为空
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
fpath=server.mappath("comimg/"&rs("imgadd"))
Set f2 = objFSO.GetFile(fpath)
f2.Delete
'---------------这里有误
end if
Set objFSO = Nothing
end if
'删除整条记录
set rs=server.createobject("adodb.recordset")
sql="delete * from com where id like '"&request("id")&"'"
rs.open sql,conn,3,1
response.redirect "commake.asp"
%>