用ASP生成静态UTF-8文件(代码)
程序员文章站
2023-02-21 08:23:45
<%@ codepage=65001 %> <% option explicit %> <%&nbs...
<%@ codepage=65001 %>
<% option explicit %>
<% response.charset="utf-8" %>
<% response.buffer=true %>
<%
dim strfullname,strcontent,strcharset,objstream
strfullname="d:logadmin3.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:logadmin3.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
%>