用ASP生成静态UTF-8文件(代码)
来源:未知 责任编辑:智问网络 发表时间:2013-11-10 20:10 点击:次
<%@ CODEPAGE=65001 %>
<% Option Explicit %>
<% Response.Charset="UTF-8" %>
<% Response.Buffer=True %>
<%
dim strFullName,strContent,strCharset,objStream
strFullName="d:asplogadmin3.asp"
strContent="test"
strCharset="utf-8"
On Error Resume Next
Set objStream = Server.CreateObject("ADODB.Stream")
With objStream
.Type = 2
.Mode = 3
.Open
.Charset = strCharset
.Position = objStream.Size
.WriteText = strContent
.SaveToFile strFullName,2
.Close
End With
Set objStream = Nothing
%>
<% Option Explicit %>
<% Response.Charset="UTF-8" %>
<% Response.Buffer=True %>
<%
dim strFullName,strContent,strCharset,objStream
strFullName="d:asplogadmin3.asp"
strContent="test"
strCharset="utf-8"
On Error Resume Next
Set objStream = Server.CreateObject("ADODB.Stream")
With objStream
.Type = 2
.Mode = 3
.Open
.Charset = strCharset
.Position = objStream.Size
.WriteText = strContent
.SaveToFile strFullName,2
.Close
End With
Set objStream = Nothing
%>
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>