Sub FSOSaveFile(Content,FileName)
dim stm:set stm=server.CreateObject("adodb.stream")
stm.Type=2 ‘以文本模式读取
stm.mode=3
stm.charset="utf-8"
stm.open
stm.Writetext (content)
stm.Position = 3
dim newStream:Set newStream = Server.CreateObject("adodb.stream")
With newStream
.Mode = 3
.Type = 1
.Open()
End With
stm.CopyTo(newStream)
newStream.SaveToFile server.MapPath(FileName),2
stm.flush
stm.Close
Set stm = Nothing
Set newStream = Nothing
End Sub
时间: 2024-10-06 04:41:29