?? config.asp
字號:
<%
'定義系統參數
Option Explicit
Dim SiteName,SiteUrl,SiteOpen,SiteCloseStr,i
Dim PageCode,PageCodes
dim Conn,Rs,Sqlstr
SiteName="圖片網" '站點名稱
SiteUrl="http://www.klcode.com.cn/" '站點路徑
SiteOpen=True '站點是否開放,Ture為開放,False為關閉
SiteCloseStr="站點升級中!請稍候訪問。。。" '站點關閉時顯示的提示
'==========================================
'判斷站點是否開啟
'==========================================
If SiteOpen=False Then
Response.Write(SiteCloseStr)
Response.End()
End If
'==========================================
'正則表達式函數區
'==========================================
Function ReplaceTest(patrn,replStr,str)
Dim regEx,str1
str1=str
Set regEx = New RegExp
regEx.Pattern = patrn
regEx.IgnoreCase = True
regEx.Global = True
ReplaceTest = regEx.Replace(str1,replStr)
End Function
Function RegExpTest(patrn, strng)
Dim regEx, Matchs, Matches, RetStr
Set regEx = New RegExp
regEx.Pattern = patrn
regEx.IgnoreCase = True
regEx.Global = True
Set Matches = regEx.Execute(strng)
For Each Matchs in Matches
RetStr = RetStr & Matchs.Value & "||"
Next
RegExpTest = RetStr
End Function
'==========================================
'采集函數區
'==========================================
'獲取頁面源代碼函數
Function GetHttpPage(HttpUrl)
If IsNull(HttpUrl)=True Then
Response.Write("請輸入網址!")
Exit Function
End If
Dim Http
Set Http=server.createobject("MSX"&"ML2.XML"&"HTTP")
Http.open "GET",HttpUrl,False
Http.Send()
If Http.Readystate<>4 then
Set Http=Nothing
response.Write("該網頁無法訪問!")
Exit function
End if
GetHttpPage=BytesToBSTR(Http.responseBody,"GB2312")
Set Http=Nothing
If Err.number<>0 then
Err.Clear
Response.Write(SiteCloseStr)
Response.End()
End If
End Function
'轉換編碼函數
Function BytesToBstr(Body,Cset)
Dim Objstream
Set Objstream = Server.CreateObject("adod"&"b.stream")
Objstream.Type = 1
Objstream.Mode =3
Objstream.Open
Objstream.Write body
Objstream.Position = 0
Objstream.Type = 2
Objstream.Charset = Cset
BytesToBstr = Objstream.ReadText
Objstream.Close
set Objstream = nothing
End Function
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -