📄 inc.asp
字号:
<%
Dim Conn
Dim Connstr
Set Conn=server.createobject("ADODB.CONNECTION")
db = "data/count15.mdb"
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
' connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath(""&db&"")
' connstr="driver={SQL Server};server=localhost;UID=sa;PWD=;database=club"
Conn.open Connstr
Function GetRs(Sql)
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1
Set GetRs = Rs
End Function
Function Fn_Dir(FilePath)
for i=1 to len(FilePath)
if left(right(FilePath,i),1)="/" or left(right(FilePath,i),1)="\" then
abc=i
exit for
end if
next
if abc <> 1 then
Fn_Dir=left(FilePath,len(FilePath)-abc+1)
end if
end Function
function Fn_IP(ip)
ip=cstr(ip)
ip1=left(ip,cint(instr(ip,".")-1))
ip=mid(ip,cint(instr(ip,".")+1))
ip2=left(ip,cint(instr(ip,".")-1))
ip=mid(ip,cint(instr(ip,".")+1))
ip3=left(ip,cint(instr(ip,".")-1))
ip4=mid(ip,cint(instr(ip,".")+1))
Fn_IP=cint(ip1)*256*256*256+cint(ip2)*256*256+cint(ip3)*256+cint(ip4)
end function
'转译字符
Function Fn_EnChar(body)
' body = Trim(body)
body = Replace(body,CHR(38),"&")
body = replace(body,">",">")
body = replace(body,"<","<")
body = Replace(body,Chr(10),"<br>")
body = Replace(body,Chr(13),"")
body = Replace(body,CHR(34),""")
body = Replace(body,CHR(39),"'")
body = Replace(body,CHR(32)," ")
Fn_EnChar = body
End Function
'还原字符
Function Fn_DeChar(body)
body = replace(body,">",">")
body = replace(body,"<","<")
body = Replace(body,"<br>",Chr(10))
body = Replace(body,"",Chr(13))
body = Replace(body," ",CHR(32))
body = Replace(body,""",CHR(34))
body = Replace(body,"'",CHR(39))
body = Replace(body,"&",CHR(38))
Fn_DeChar = body
End Function
'
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -