想要在后台删除一个图片文件,结果显示Microsoft VBScript 运行时错误 错误 '800a004c' 路径未找到
MicrosoftVBScript运行时错误错误'800a004c'路径未找到/messages/editphotocoll.asp,行39editphotocoll.a...
Microsoft VBScript 运行时错误错误 '800a004c'路径未找到/messages/editphotocoll.asp,行 39
editphotocoll.asp
<!--#include file = "conn.asp"-->
<%url="editphotocoll.asp"%>
<%collid=request("collid")%>
<%uid=request("uid")%>
<%
'取得此相册信息
sql="select photocoll,photogroup,colltype from photoso where id=" & collid
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,1
colltype=rs("colltype") '相册数目
photogroup=rs("photogroup") '相册所属分类
photocoll=rs("photocoll") '相册名字
rs.close
set rs=nothing
'开始执行删除操作
yy=year(date)
mm=right("00"&month(date),2)
dd=right("00"&day(date),2)
idate=yy & "-" & mm & "-" & dd & "-"
xx=right("00"&hour(time),2)
ff=right("00"&minute(time),2)
mm=right("00"&second(time),2)
itime=xx & ":" & ff & ":" & mm
itime=idate&itime
'用FSO删除图片所在目录,再删除数据库中的记录
'filepath=Server.MapPath(".") & "\" & "photo\" & photogroup & "\" & photocoll
filepath= "photo\" & photogroup & "\" & photocoll
'response.Write filepath
'response.End()
Set Fso=server.createobject("scripting.filesystemobject")
Fso.DeleteFolder(Filepath)
set Fso=nothing
conn.execute "delete * from photourl where photogroup='"&photogroup&"' and photouid='"&photocoll&"'" '删除属于此像册的图片在数据库中的记录
conn.execute "delete * from photoso where id=" & collid '删除数据库中此相册资料
'conn.execute "update photoso set colltype=colltype-1" '修改系统资料
'结束删除操作,返回此用户所有相册
url="piccshow.asp?uid=" & uid
response.redirect url
response.end
%> 展开
editphotocoll.asp
<!--#include file = "conn.asp"-->
<%url="editphotocoll.asp"%>
<%collid=request("collid")%>
<%uid=request("uid")%>
<%
'取得此相册信息
sql="select photocoll,photogroup,colltype from photoso where id=" & collid
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,1
colltype=rs("colltype") '相册数目
photogroup=rs("photogroup") '相册所属分类
photocoll=rs("photocoll") '相册名字
rs.close
set rs=nothing
'开始执行删除操作
yy=year(date)
mm=right("00"&month(date),2)
dd=right("00"&day(date),2)
idate=yy & "-" & mm & "-" & dd & "-"
xx=right("00"&hour(time),2)
ff=right("00"&minute(time),2)
mm=right("00"&second(time),2)
itime=xx & ":" & ff & ":" & mm
itime=idate&itime
'用FSO删除图片所在目录,再删除数据库中的记录
'filepath=Server.MapPath(".") & "\" & "photo\" & photogroup & "\" & photocoll
filepath= "photo\" & photogroup & "\" & photocoll
'response.Write filepath
'response.End()
Set Fso=server.createobject("scripting.filesystemobject")
Fso.DeleteFolder(Filepath)
set Fso=nothing
conn.execute "delete * from photourl where photogroup='"&photogroup&"' and photouid='"&photocoll&"'" '删除属于此像册的图片在数据库中的记录
conn.execute "delete * from photoso where id=" & collid '删除数据库中此相册资料
'conn.execute "update photoso set colltype=colltype-1" '修改系统资料
'结束删除操作,返回此用户所有相册
url="piccshow.asp?uid=" & uid
response.redirect url
response.end
%> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询