用ASP生成静态UTF-8文件(代码)
2007-11-07 09:30:27 来源:WEB开发网核心提示:<%@ CODEPAGE=65001 %> <% Option Explicit %> <% Response.Charset="UTF-8" %> <% Response.Buffer=True %> <% dim strFullName,st
<%@ CODEPAGE=65001 %>
<% Option Explicit %>
<% Response.Charset="UTF-8" %>
<% Response.Buffer=True %>
<%
dim strFullName,strContent,strCharset,objStream
strFullName="d:\asp\blog\admin\3.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:\asp\blog\admin\3.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
%>
- ››asp.net页面弄成伪静态页面
- ››Asp.net 中将汉字转换成拼音的方法
- ››ASP.NET及JS中的cookie基本用法
- ››ASP.NET获取MS SQL Server安装实例
- ››asp.net实现调用百度pai 在线翻译英文转中文
- ››ASP.NET页面选项进行提示判断
- ››Asp.net定时执行程序
- ››ASP.NET中利用DataList实现图片无缝滚动
- ››ASP.NET验证控件RequiredFieldValidator
- ››ASP.NET中使用System.Net.Mail发邮件
- ››ASP.NET中获取用户控件中控件的ID
- ››ASP.NET中FileBytes写成文件并存档
更多精彩
赞助商链接