方法1:createTextFileはファイルメソッドを生成します
コードコピーは次のとおりです。
<%functionwriteTofile(filename、filecontent)
setFSO = server.createObject( "Scripting.filesystemObject")
setfp = fso.createTextfile(server.mappath(filename)、、 true)
fp.write(filecontent)
endFunction%>
方法2:ADODB.Streamファイル生成方法
コードコピーは次のとおりです。
<%functionwriteTofile(filename、filecontent)
setCcobjStream = server.createObject( "adodb.stream")
withccobjstream
.type = 2
.mode = 3
。開ける
.charset = "utf-8"
.position = ccobjstream.size
.writeTextFileContent
.savetofilefilename、2
。近い
終わりに
endFunction%>