用asp實現(xiàn)讀取文件的最后一行的代碼
更新時間:2009年12月08日 02:18:47 作者:
asp 讀文件最后一行的函數(shù)代碼
復(fù)制代碼 代碼如下:
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
相關(guān)文章
asp下取得客戶端IP地址函數(shù) 轉(zhuǎn)換IP地址函數(shù)
asp下取得客戶端IP地址函數(shù) 轉(zhuǎn)換IP地址函數(shù)...2007-08-08asp 獲取參數(shù)值與sql安全過濾參數(shù)函數(shù)代碼
下面的代碼是從aspcms系統(tǒng)中扒下的代碼,在獲取參數(shù)值與sql安全過濾參數(shù)方面做了限制2012-01-01