Python语言技术文档

微信小程序技术文档

php语言技术文档

jsp语言技术文档

asp语言技术文档

C#/.NET语言技术文档

html5/css技术文档

javascript

点击排行

您现在的位置:首页 > 技术文档 > asp技巧

用asp实现读取文件的最后一行的代码

来源:中文源码网    浏览:318 次    日期:2024-04-19 05:34:10
【下载文档:  用asp实现读取文件的最后一行的代码.txt 】


用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

相关内容