最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp读写文件函数
时间:2022-06-29 13:47:49 编辑:袖梨 来源:一聚教程网
'本文章提供了二款asp文件操作函数,read打开文件读取全部内容,wirte把内容写入到一个文件。
function read(path)
set mf=server.createobject("scripting.filesystemobject")
set mt=mf.opentextfile(server.mappath(path),1,true,-2)
if mt.atendofstream=true then
read=""
else
read=mt.readall
end if
mt.close
set mt=nothing
set mf=nothing
end function
'#######################################################################################
function write(path,str)
set mf=server.createobject("scripting.filesystemobject")
set mt=mf.opentextfile(server.mappath(path),8,true,-2)
mt.write(str)
mt.close
set mt=nothing
set mf=nothing
end function
相关文章
- 《夜族崛起》铁匠西里尔位置一览 05-17
- 《寓言之地》1.02更新内容一览 05-17
- 《辐射4》steam好评率介绍 05-17
- 《夜族崛起》技能强化珠宝掉落说明 05-17
- 《辐射4》主机控制台介绍 05-17
- 《星露谷物语》海草和绿藻获取方法 05-17