不生成靜態(tài)頁(yè) 并且降低服務(wù)器負(fù)擔(dān)! 復(fù)制代碼 代碼如下: <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% '讀取遠(yuǎn)程文件的函數(shù) 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 '編碼轉(zhuǎn)換 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 '先試圖訪問(wèn)緩存,看有沒(méi)有,或者過(guò)期沒(méi)有 dateVal = Application("defaultdate") If dateVal = "" Then dateVal = DateAdd("s",1200,Now) If Application("default") <> "" Then