方法一:createtextfile生成文件方法 复制代码 代码如下:<%function WriteToFile(FileName,FileContent) set fso=server.createobject("scripting.filesystemobject") set fp=fso.createtextfile(server.mappath(FileName),,True) fp.write(FileContent) end function%> 方法二:ADODB.Stream生成文件方法 复制代码 代码如下:<%Function WriteToFile(FileName,FileContent) Set ccObjStream = Server.CreateObject("ADODB.Stream") With ccObjStream .Type = 2 .Mode = 3 .Open .Charset = "utf-8" .Position = ccObjStream.Size .WriteText FileContent .SaveToFile FileName,2 .Close End With End Function%>
推荐阅读
asp实现图片右键滑轮控制大小的函数
<% '****************************** '函数:bbimg(l1,maximgheight,maximgwidth) '参数:l1,图片路径;maximgheight,最大允许图片高度;maximgwidth,最大允许图片宽度 '作者:阿里西西 '日期:2007/7/12 '描述:限>>>详细阅读
本文标题:用ASP生成UTF-8网页文件的两种方法
地址:http://www.17bianji.com/kaifa2/ASP/32519.html
1/2 1