我是靠谱客的博主 瘦瘦汽车,这篇文章主要介绍用asp实现读取文件的最后一行的代码,现在分享给大家,希望可以做个参考。

复制代码 代码如下:

function FSOlastline(filename)
dim fso,f,temparray,tempcnt
set fso = server.CreateObject("scripting.filesystemobject")
if not fso.fileExists(server.mappath(filename)) then exit function
set f = fso.opentextfile(server.mappath(filename),1)
if not f.AtEndofStream then
tempcnt = f.readall
f.close
set f = nothing
temparray = split(tempcnt,chr(13)&chr(10))
FSOlastline = temparray(ubound(temparray))
end if
end function

最后

以上就是瘦瘦汽车最近收集整理的关于用asp实现读取文件的最后一行的代码的全部内容,更多相关用asp实现读取文件内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(136)

评论列表共有 0 条评论

立即
投稿
返回
顶部