conn.asp
来自「本源代码为终点小说连载系统 v1.15 Build 0430 SQL清风修改版,」· ASP 代码 · 共 43 行
ASP
43 行
<%
IsUseSQl=0
dim conn
dim connstr
'db="../databas/#data#bas.mdb" '数据库路径和名称(可以采用相对或绝对地址,建议相对地址)
Set conn = Server.createobject("ADODB.Connection")
ConnStr="Provider=SQLOLEDB;pwd=1;User ID=sa;database=zd;Data Source=(local)"
'connstr = "Provider=Microsoft.jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
conn.Open connstr
%>
<%
sub connclose()
conn.close
set conn=nothing
end sub
%>
<%
Function CheckSql(str)
dim textstr
textstr=LCase(str)
textstr=replace(textstr,"'","")
textstr=replace(textstr,"%","")
textstr=replace(textstr,",","")
textstr=replace(textstr," ","")
textstr=replace(textstr,"%20","")
textstr=replace(textstr,"insert","")
textstr=replace(textstr,"select","")
textstr=replace(textstr,"update","")
textstr=replace(textstr,"count","")
textstr=replace(textstr,"delete","")
textstr=replace(textstr,"where","")
CheckSql=textstr
End Function
Function CheckSqlnum(str)
if IsNumeric(str)=0 then
response.write "<script language=javascript>alert('数据输入错误,请检查所有数字内容是否有误!');history.back(-1);</script>"
response.End
end if
End Function
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?