日期:2010-02-07 浏览次数:20953 次
用asp生成静态utf-8编码网页的代码。用fso无法生成,只有使用Adodb.Stream才可以生成真正的UTF-8静态页
<%
Dim sContent,iType,oAdos
sContent = ""
iType = 2 '类型(1-二进制/2-文本)
Set oAdos = Server.CreateObject("Adodb.Stream")
With oAdos
.Type = iType
.Mode = 3
.CharSet = "utf-8"
.Open
If iType = 1 Then
.Write sContent
Else
.WriteText sContent
End If
.SaveToFile Server.Mappath("test.html"), 2
.Close
End With
Set oAdos = Nothing
%>