[导入]ASP常用函数:LoadFromFile()
<%
'功能:获取文件数据流
'来源:http://jorkin.reallydo.com/article.asp?id=523
Function LoadFromFile(sFileName, sCharSet)
On Error Resume Next
Dim oStream
Set oStream = Server.CreateObject("ADODB.Stream")
oStream.Type = 2
oStream.Mode = 3
oStream.Open
oStream.Charset = sCharSet
oStream.Position = oStream.Size
oStream.LoadFromFile sFileName
LoadFromFile = oStream.ReadText
oStream.Close
Set oStream = Nothing
Err.Clear
End Function
%>
文章来源:http://Jorkin.Reallydo.Com/default.asp?id=523