📄 conn.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
dim db,connstr
Response.Buffer = True
Server.ScriptTimeOut = 90
Session.CodePage=65001
connstr="dbq="&server.mappath("data/fwyblog.mdb")&";driver={Microsoft access driver (*.mdb)}"
set db=server.createobject("adodb.connection")
db.open connstr
If Err Then
Err.Clear
Set Conn = Nothing
Response.Write("<head><meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" /><title>数据库连接出错,请检查连接字串</title></head><body><div align=""center"" style=""width:400px;height:100px;padding: 8px;font-size:9pt;border: 1px solid ThreeDShadow;POSITION:absolute;top:expression((document.body.offsetHeight-100)/2);left:expression((document.body.offsetWidth-400)/2);""><table width=""100%"" height=""100%"" style=""font-size:12px;font-family:Tahoma;""><tr><td align=""center""><strong>数据库连接出错,请检查连接字串</strong></td></tr></table></div></body>")
Response.End
End If
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -