芜湖网站开发

芜湖网站开发公司

ASP FSO 读取,写入文本

发布于:2015/11/17 阅读()次 标签:芜湖做网站

'读取文件
Set fso = CreateObject("Scripting.FileSystemObject")
Set htmlwrite=fso.OpenTextFile(server.MapPath("/inc/config.asp"))
strOut=htmlwrite.ReadAll
htmlwrite.close
response.write(strOut)


'request.收集文档并生成文件
Dim txtFile,FSO,myFile,a,b,txt
a = request("config")
txtFile = Server.mapPath("/inc/config.asp")
Set FSO = createObject("Scripting.FileSystemObject")
Set myFile = FSO.createTextFile(txtfile,True)
myFile.writeLine(a) '第一次写入
myFile.close '注意这里要关闭
set myFile = Nothing

上一篇:ASP统计查询记录的总数--记录集对象的方法

下一篇:kindeditor时,取不到textarea里面的值