asp用fso创建一个文件的代码应该这样写:
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout=fso.OpenTextFile(xmlfile,2,true)
fout.WriteLine neirong
fout.Close
Set fso=Nothing
至于fso的OpenTextFile方法,你可以到w3school这个站去查一下手册。
这样文件是肯定能生成的了。如果还是为空,检查一下你的neirong是否有接收到值吧。
比如改成这样:
neirong=Request("xmlcontents")
if trim(neirong)<>"" then
//创建文件的代码
else
response.write "没接收到值!"
end if
本文如未解决您的问题请添加抖音号:51dongshi(抖音搜索懂视),直接咨询即可。