“使用fso读取文件内容的函数”的ASP编程代码是什么

renwenyishuadmin 提交于 周三, 2018/06/13 - 03:35
分类

“使用fso读取文件内容的函数”的ASP编程代码是:

function fsofileread(filename)

dim objfso,objcountfile,filetempdata

set objfso = server.createobject("scripting.filesystemobject")

set objcountfile = objfso.opentextfile(server.mappath(filename),1,true)

fsofileread = objcountfile.readall

objcountfile.close

set objcountfile=nothing

set objfso = nothing

end function