用ASP生成静态UTF-8文件(代码)
2018-09-06 12:50
阅读:563
<%@CODEPAGE=65001%>
<%OptionExplicit%>
<%Response.Charset=UTF-8%>
<%Response.Buffer=True%>
<%
dimstrFullName,strContent,strCharset,objStream
strFullName=d:asplogadmin3.asp
strContent=test
strCharset=utf-8
OnErrorResumeNext
SetobjStream=Server.CreateObject(ADODB.Stream)
WithobjStream
.Type=2
.Mode=3
.Open
.Charset=strCharset
.Position=objStream.Size
.WriteText=strContent
.SaveToFilestrFullName,2
.Close
EndWith
SetobjStream=Nothing
%>
评论
亲,登录后才可以留言!