ASP程序 Microsoft VBScript 运行时错误 错误 '800a004c
MicrosoftVBScript运行时错误错误'800a004c'路径未找到/book/wap/wap_view_book.asp,行48这个错误,请问怎么解决?附上代...
Microsoft VBScript 运行时错误 错误 '800a004c'
路径未找到
/book/wap/wap_view_book.asp,行 48
这个错误,请问怎么解决?
附上代码
~~~~~~~~~~~~~~~~~~~~~~
<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
<%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<!--#include file="conn.asp"-->
<%
response.ContentType="text/vnd.wap.wml;charset=utf-8"
Response.Expires = -1
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "Cache-Control", "no-cache, must-revalidate"
name=session("name")
%>
<wml>
<head>
<meta http-equiv='Cache-Control' content='no-Cache'/>
<meta http-equiv='Cache-Control' content='max-age=0'/>
</head>
<%
set rs = server.createobject("adodb.recordset")
sql="select * from list_view where id="&request("id")&""
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.redirect "ereer.asp?id=1"
else
view_id=rs("view_id")
if rs("view_get")=0 then
response.redirect "look_caiji.asp?id="&request("id")&"&zhan="&zhan&""
end if
if rs("view_savetotxt")=1 then
view_id=rs("view_id")
viewRootFolder="../html/" 'HTML存放目录
view_localpath0 = left(view_id,2) '一级分类目录
view_localpath1 = left(view_id,4) '二级分类目录
view_localpath2 = left(view_id,6) '作品分类目录
view_localpath3 = view_id '作品目录
view_localpath = view_localpath0&"/"&view_localpath1&"/"&view_localpath2&"/"&view_localpath3&"/"
viewFolder = viewRootFolder&""&view_localpath
view_localpathTXT="TXT"
viewFolder1=viewFolder&view_localpathTXT&"/"
'file=""&viewFolder1&""&request("id")&".TXT"
file=".."&rs("view_ok")&""
'------------------
Dim fso, f1, ts, jumpip, FilePath
FilePath=server.mappath(""&file&"")
Const ForReading = 1
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(FilePath, ForReading) '这里就是出错的第48代码,请帮看看怎么解决
jumpip = ts.ReadLine
set ts=nothing
set fso=nothing
view_ok2=jumpip
else
view_ok2=rs("view_ok2")
end if%>
SORRY.很少到这里来,所以没有积分回报,望好心人帮解决
找不到文件..
你Response一下 file 和 FilePath, 看是不是你预期的效果..
回答者:Flycat1022
很感谢你的回答
但是不明白你的意思
能再详细些吗 展开
路径未找到
/book/wap/wap_view_book.asp,行 48
这个错误,请问怎么解决?
附上代码
~~~~~~~~~~~~~~~~~~~~~~
<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
<%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<!--#include file="conn.asp"-->
<%
response.ContentType="text/vnd.wap.wml;charset=utf-8"
Response.Expires = -1
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "Cache-Control", "no-cache, must-revalidate"
name=session("name")
%>
<wml>
<head>
<meta http-equiv='Cache-Control' content='no-Cache'/>
<meta http-equiv='Cache-Control' content='max-age=0'/>
</head>
<%
set rs = server.createobject("adodb.recordset")
sql="select * from list_view where id="&request("id")&""
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.redirect "ereer.asp?id=1"
else
view_id=rs("view_id")
if rs("view_get")=0 then
response.redirect "look_caiji.asp?id="&request("id")&"&zhan="&zhan&""
end if
if rs("view_savetotxt")=1 then
view_id=rs("view_id")
viewRootFolder="../html/" 'HTML存放目录
view_localpath0 = left(view_id,2) '一级分类目录
view_localpath1 = left(view_id,4) '二级分类目录
view_localpath2 = left(view_id,6) '作品分类目录
view_localpath3 = view_id '作品目录
view_localpath = view_localpath0&"/"&view_localpath1&"/"&view_localpath2&"/"&view_localpath3&"/"
viewFolder = viewRootFolder&""&view_localpath
view_localpathTXT="TXT"
viewFolder1=viewFolder&view_localpathTXT&"/"
'file=""&viewFolder1&""&request("id")&".TXT"
file=".."&rs("view_ok")&""
'------------------
Dim fso, f1, ts, jumpip, FilePath
FilePath=server.mappath(""&file&"")
Const ForReading = 1
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(FilePath, ForReading) '这里就是出错的第48代码,请帮看看怎么解决
jumpip = ts.ReadLine
set ts=nothing
set fso=nothing
view_ok2=jumpip
else
view_ok2=rs("view_ok2")
end if%>
SORRY.很少到这里来,所以没有积分回报,望好心人帮解决
找不到文件..
你Response一下 file 和 FilePath, 看是不是你预期的效果..
回答者:Flycat1022
很感谢你的回答
但是不明白你的意思
能再详细些吗 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询