用asp实现读取文件的最后一行的代码
更新时间:2009年12月08日 02:18:47 作者:
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
相关文章
再来个专门为google量身定做的sitemap生成代码,(可是动态的哦)
再来个专门为google量身定做的sitemap生成代码,(可是动态的哦)...2006-12-12
ReplaceSaveRemoteFile 替换、保存远程图片 的代码
ReplaceSaveRemoteFile 替换、保存远程图片 的代码...2007-09-09
rs.open sql,conn,1,1与rs.open sql,conn,1.3还有rs.open sql,conn,
Rs.Open语法如下:rs.Open Source,ActiveConnection,CursorType,LockType Source为sql语句,ActiveConnection为数据库连接,CursorType是游标,LockType是数据锁定类型.2011-01-01


最新评论