ASP读写文件

ASP读取文件
程序代码 程序代码
set fso=server.createobject("scripting.filesystemobject")
set file=fso.opentextfile(server.mappath("index.html"),1,true) '1读取 2写入 8追加
filestr=file.readall
response.write filestr
file.close
set file = nothing
set fso = nothing

ASP写入文件
程序代码 程序代码
set fso = createobject("scripting.filesystemobject")
set file = fso.opentextfile(server.mappath("index.html"),2,true) '1读取 2写入 8追加
file.write "hello world!"
file.close
set file = nothing
set fso = nothing



[本日志由 刚子 于 2011-03-14 12:12 AM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: -
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
t