蓝色空间 天气小偷(2)
set http=nothing
If Err.number<>0 then
Response.Write "<p align=center>服务器获取文件内容出错,请稍后再试!!!</p>"
Err.Clear
End If
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
'截取字符串,1.包括起始和终止字符,2.不包括
Function strCut(strContent,StartStr,EndStr,CutType)
Dim strHtml,S1,S2
strHtml = strContent
On Error Resume Next
Select Case CutType
Case 1
S1 = InStr(strHtml,StartStr)
S2 = InStr(S1,strHtml,EndStr)+Len(EndStr)
Case 2
S1 = InStr(strHtml,StartStr)+Len(StartStr)
S2 = InStr(S1,strHtml,EndStr)
End Select
If Err Then
strCute = "<p align='center'>没有找到需要的内容。</p>"
Err.Clear
Exit Function
Else
strCut = Mid(strHtml,S1,S2-S1)
End If
End Function
'----------------------------
'取得当前脚本名称
'----------------------------
Function GetScript()
Dim ScriptAddress
ScriptAddress = CStr(Request.ServerVariables("SCRIPT_NAME"))
GetScript = ScriptAddress
End Function
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
内容版权声明:除非注明,否则皆为本站原创文章。