http://www.corange.cn/archives/2008/10/1855.html
ASP读取一个文本文件,然后在特定的字符后面写入一段字符串的示例代码:
set fso=CreateObject("Scripting.FileSystemObject")
set f = fso.OpenTextFile(server.MapPath(文件路径))
if not f.atendofstream then
content=f.ReadAll
else
content=""
end if
f.close
set f=nothing
内容保存在content中.
本文介绍了一个使用ASP读取文本文件并追加内容的示例代码。通过创建Scripting.FileSystemObject对象来操作文件,读取指定路径下的文本文件内容,并将其存储在变量content中。

被折叠的 条评论
为什么被折叠?



