现在的位置: 网页制作教程网站制作教程 >正文
asp学习教程

ASP读取txt文件内容的函数

发表于2017/1/12 网站制作教程 0条评论 ⁄ 热度 2,004℃

这是编写的一个ASP读取txt记事本文件内容的函数,代码如下:

Function readAllFromFile( oFS, sFSpec)
Dim sRVal : sRVal = ""
With oFS.OpenTextFile( sFSpec )
If Not .AtEndOfStream Then sRVal = .ReadAll
.Close
End With
ReadAllFromFile = sRVal
End Function

oFS 为文件系统对象,sFSpec为文件完整路径

  • 暂无评论