错误类型:
Microsoft VBScript 运行时错误 (0x800A01A8)
缺少对象: 'conn'
/xf/conn.asp, 第 16 行
POST Data:
错误 '80020009'
发生意外。
/iisHelp/common/500-100.asp,行 219
conn.asp这个位置的代码是这样的
15:sub closeconn
16:conn.close
17:set conn=nothing
18:end sub
刚在学还不太懂哈
<script language="JavaScript" src="system/zhxf.js" type="text/JavaScript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
dim conn
dim dbpath
set conn=server.createobject("adodb.connection")
DBPath = Server.MapPath("mdb/zhxf.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
sub closers(rs)
rs.close
set rs=nothing
end sub
sub closeconn
conn.close
set conn=nothing
end sub
sub managemode
if session("admin")<>"zhxf" then
response.write("<script>top.location='error.asp?errormsg=<li>您不是管理员,或您没有登录!</li><br><li>您的登录信息已经过期,请重新登录!</li>';</script>")
end if
end sub
function zhxf(text)
text=trim(text)
if not isnull(text) then
text = replace(text, ">", ">")
text = replace(text, "<", "<")
text = Replace(text, CHR(32), "<I></I> ")
text = Replace(text, CHR(9), " ")
text = Replace(text, CHR(34), """)
text = Replace(text, CHR(39), "'")
text = Replace(text, CHR(13), "")
text = Replace(text, CHR(10) & CHR(10), "</P><P> ")
text = Replace(text, CHR(10), "<BR> ")
zhxf=text
end if
end function
function angelic(vstrin)
dim i,strreturn
strreturn = ""
for i = 1 to len(vstrin)
thischr = mid(vstrin,i,1)
if abs(asc(thischr)) < &hff then
strreturn = strreturn & thischr
else
innercode = asc(thischr)
if innercode < 0 then
innercode = innercode + &h10000
end if
hight8 = (innercode and &hff00)\ &hff
low8 = innercode and &hff
strreturn = strreturn & "%" & hex(hight8) & "%" & hex(low8)
end if
next
angelic = strreturn
end function
Response.Buffer=True
set setrs=conn.execute("select * from setos where id=2")
sessiontimeout=setrs("sessiontimeout")
session.timeout=sessiontimeout
rsize=setrs("indexrsize")
dsize=setrs("dsize")
tsize=setrs("tsize")
showlx=setrs("showlx")
showhot=setrs("showhot")
shownew=setrs("shownew")
showly=setrs("showly")
showtop=setrs("showtop")
c1=setrs("c1")
c2=setrs("c2")
c3=setrs("c3")
c4=setrs("c4")
c5=setrs("c5")
closers(setrs)
'严重申明
sub manageend
closeconn
response.write("<table width=618 border=0 cellpadding=0 cellspacing=0><tr><td height=5></td></tr></table>")
response.write("<table width=618 border=0 cellpadding=0 cellspacing=0 bgcolor="&c3&"><tr><td height=2 align=center bgcolor="&c5&"></td></tr><tr>")
response.write("<td height=16 align=center>Powered by <a>旅游线路预订程序</a></td></tr><tr>")
response.write("<td height=16 align=center>Copyright©2007 - 2009 "©r&"</td></tr><tr><td height=16 align=center>")
end sub
%>
<%sub pagestart%>
<TABLE cellSpacing=0 cellPadding=0 width=755 align=center border=0>
<TBODY>
<TR vAlign=top>
<TD background=images/top.jpg height=256>
</TD></TR>
<TR>
<TD bgColor=#ffffff height=27>
<DIV align=center><A
href="index.asp">首 页</A>
<FONT color=#3399FF>
|| <A
href="jianjie.asp">关于我社</A>
|| <A href="news.asp">旅游动态</A>
|| <A
href='search.asp' title=查找适合我的线路>芳菲之旅</A>
|| <A
href='listall.asp?action=userlook' title=查看自己的预订被处理情况>预订查看</A>
|| <A
href="menu.ASP">旅游咨讯</A>
|| <A
href='guestbook.asp' title=进入留言板>驴友留言</A>
|| <A
href='admin_login.asp?' title=进入后台管理>管理员入口</A>
</FONT></DIV></TD></TR>
</TBODY></TABLE>
<%end sub%>
<%sub pageend%>
<TABLE height=125 cellSpacing=0 cellPadding=0 width=755 align=center border=0>
<TBODY>
<TR>
<TD valign=bottom background=images/line.gif>
<TABLE cellSpacing=0 cellPadding=0 width=600 align=center border=0>
</TABLE>
<%
closeconn
%>
<%end sub%>