Asp读取文本文件最后一行的函数:
Function getLastLine(fileName)
Dim fso,srcFileContent,tempLine
ForReading = 1
FileName = Server.MapPath(FileName)
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(fileName) Then
Set srcFile = fso.OpenTextFile(fileName, ForReading)
While Not srcFile.AtEndOfStream
tempLine = srcFile.ReadLine
Wend
Set srcFile = Nothing
Set fso = Nothing
getLastLine = tempLine
Else
getLastLine = "file not exists" '当文件不存在时返回此错误
End If
End Function
|
文章来源于lcx.cc:【Asp】Asp读取文本文件最后一行的函数
相关推荐: 建站之星 SiteStar V2.0 本地包含漏洞
这是一个老漏洞了,临时有用,拿来收集下,说不定以后有用…… 转载于:http://www.llsilver.com/invasion/hole/sitestar-v2-0-0day.html 建站之星 SiteStar V2.0 漏洞由大牛云集的t00ls会员…
评论