相关文件代码,供高手参考!
inc.asp代码:
<!-- #include File="Conn.asp" -->
<!-- #include File="Inc/94kk_Cls.asp" -->
<!-- #include File="Inc/Fun_Cls.asp" -->
<%
Dim BBS94KK
Set BBS94KK = New Cls_94KK
BBS94KK.Config()
'If Instr(BBS94KK.BbsURL,"admin_")=0 Then
BBS94KK.CheckUser()
%>
conn.asp代码:
<%@LANGUAGE="VBSCRIPT"%>
<%
Option Explicit
Response.Buffer = True
'Session.CodePage=936
Const Timeset=0 '时区相对东八区(北京时间)
Dim Conn,StartTime,PageUrl,CacheName
StartTime = Timer()
PageURL=Lcase(Request.ServerVariables("URL"))
CacheName="94KK"&Replace(left(PageURL,instrRev(PageURL,"/")),"/","")
Sub ConnectionDatabase
Dim Db,ConnStr
on error resume next
'======================
Db="Data/94kk.asp" '修改双引号里面数据库名称
'======================
Set conn=Server.CreateObject("ADODB.Connection")
ConnStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.mappath(Db)
Conn.Open ConnStr
If Err Then
Err.Clear
Set Conn = Nothing
Response.Write "数据连接错误!"
Response.End
End If
End Sub
%>