如何解决Server.MapPath() 错误 'ASP 0173 : 80004005'

来源:百度知道 编辑:UC知道 时间:2024/06/25 10:07:01
我在运行管理删除信息的时候出现:
Server.MapPath() 错误 'ASP 0173 : 80004005'

无效路径字符

/admin/xinxi_del.asp,行36

MapPath 方法的路径参数中有无效字符。
我找到相应的代码段
sub deltu()
dim whichfile
whichfile=server.mappath("../"& tupian & "") (36行)
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
if objFSO.fileExists(whichfile) then
objFSO.DeleteFile(whichfile)
end if
set objfso=nothing
end sub
response.write "<script language=JavaScript>" & chr(13) & "alert('删除信息成功!')</script>"
response.write "<meta http-equiv=refresh content=""1;URL=xinxi.asp"">"
response.end
rs.close
set rs=nothing
closedb
路径参数中有无效字符应该怎么该啊

server.mappath("../"& tupian & "") 改为server.mappath("../"& tupian )

tupian 这个变量没有值!

在whichfile=server.mappath("../"& tupian & "") 这句上面加一句:

tupian="database/data.mdb" '你数据库的实际路径