- Function ReadText(FileName)
- Dim objFSO
- Dim fdata
- Dim objCountFile
- Err.Clear
- 'On Error Resume Next
- Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
- Set objCountFile = objFSO.OpenTextFile(FileName, 1, True)
- If Not objCountFile.AtEndOfStream Then fdata = objCountFile.ReadAll
- objCountFile.Close
- Set objCountFile = Nothing
- Set objFSO = Nothing
- If Err.Number <> 0 Then
- ' ReadText = fdata
- Else
- ReadText = fdata
- End If
- End Function
|