Function ReadAllTextFile
Const ForReading = 1, ForWriting = 2
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("c:\testfile.txt", ForWriting, True)
f.Write "Hello world!"
Set f = fso.OpenTextFile("c:\testfile.txt", ForReading)
ReadAllTextFile = f.ReadAll
End Function
Dim fso, tf
Set fso = CreateObject("Scripting.FileSystemObject")
Set tf = fso.CreateTextFile("c:\testfile.txt", True)
tf.WriteLine("Testing 1, 2, 3.")
tf.WriteBlankLines(3)
tf.Write ("This is a test.")
tf.Close
在其他地方看到的,你看看
Set WinHttp = CreateObject("WinHttp.WinHttpRequest.5.1")
If WinHttp Is Nothing Then Set WinHttp = CreateObject("WinHttp.WinHttpRequest")
WinHttp.Open "GET", "http://www.51testing.com/batch.download.php?aid=10479", False
WinHttp.Send
arrArray = WinHttp.ResponseBody
Set WinHttp = Nothing