📄 conn.asp
字号:
<%
dim ewap_db, cn,cnstr
set cn=server.createobject("adodb.connection")
ewap_db="database/ewap.mdb"
cnstr="provider=microsoft.jet.oledb.4.0;data source="&server.mappath(ewap_db)
cn.open cnstr
If err then
err.clear
set cn=nothing
response.write"数据库连接错误!"
rsponse.end
end if
%>
<%
dim ewap_config,lang,lanid
set ewap_config=server.createobject("adodb.recordset")
lang="select * from info where id=1"
ewap_config.open lang,cn,3,3
if ewap_config.eof and ewap_config. bof then
response.write"数据库连接错误!"
rsponse.end
else
ewap_name=ewap_config("name")
ewap_tel=ewap_config("tel")
ewap_wap=ewap_config("wap")
ewap_web=ewap_config("web")
ewap_fax=ewap_config("fax")
ewap_pn=ewap_config("pn")
ewap_add=ewap_config("add")
ewap_top=ewap_config("top")
if not isnumeric(ewap_config("lan")) then
response.write"数据库连接错误!"
rsponse.end
else
lanid=ewap_config("lan")
dim ewap_config1,lang2
set ewap_config1=server.createobject("adodb.recordset")
lang2="select * from lan where id="&lanid
ewap_config1.open lang2,cn,3,3
if ewap_config1.eof and ewap_config1.bof then
response.write"数据库连接错误!"
rsponse.end
else
dim ewap_(70),i,j
for i=0 to ewap_config1.fields.count-2
j=i+1
ewap_(i)=ewap_config1(j)
next
end if
end if
end if
ewap_config1.close
set ewap_config1=nothing
ewap_config.close
set ewap_config=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -