cache 를 이용 하여 정적 페이지 를 비교 하 는 웹 기술
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
'
Public Function readRemoteFile(RemoteDataUrl)
Dim XMLHttp
'On Error Resume Next
Set XMLHttp = Server.CreateObject("Microsoft.XMLHTTP")
With XMLHttp
.Open "Get", RemoteDataUrl, False
.Send
readRemoteFile = BytesToBstr(.responseBody, "UTF-8")
End With
Set XMLHttp = Nothing
End Function
'
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.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
Function tobody()
Dim dateVal
' , ,
dateVal = Application("defaultdate")
If dateVal = "" Then dateVal = DateAdd("s",1200,Now)
If Application("default") <> "" Then
If DateDiff("s", Now, dateVal) > 0 Then
' , , ,
tobody = Application("default")&"<!--new cache"&dateVal&"-->"
Exit Function
End If
End If
Dim body
' , , , 。
body = readRemoteFile("http://www.aoaob.com/default.asp")
tobody = body&"<!--made cache"&Now&"-->"
Application.Lock
Application("default") = body
Application("defaultdate") = DateAdd("s",1200,Now)
Application.UnLock
End Function
Response.Write(tobody())
%>
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
HDU 4857: 탈출 [토폴로지]1 번 부터 n 번 까지 입 니 다.동시에 일부 이상 한 제약 조건 이 있 는데 모두 a 는 b 전에 있어 야 한다. 이 사람들 은 가난 한 사람 도 있 고 부자 도 있다.1 번 이 가장 부유 하고 2 번 이 두 번...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.