复制代码代码如下所示:
功能fsolastline(文件名)
昏暗的FSO,F,temparray,tempcnt
设置FSO = server.createobject(脚本。FileSystemObject )
如果不fso.fileexists(server.mappath(文件名))然后退出功能
集F = fso.opentextfile(server.mappath(文件名),1)
如果不f.atendofstream然后
tempcnt = f.readall
f.close
设置f =无
temparray =分裂(tempcnt,CHR(13)CHR(10))
fsolastline = temparray(UBound(temparray))
最后如果
端功能