ASPReadAllメソッド_
❮完全なTextStreamオブジェクトリファレンス
ReadAllメソッドは、TextStreamファイル全体を読み取り、結果を文字列として返します。
注:この方法は、大きなファイルには適していません(メモリリソースを浪費します)。
構文
TextStreamObject.ReadAll
例
<%
dim fs,f,t,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateTextFile("c:\test.txt")
f.write("Hello World!")
f.close
set t=fs.OpenTextFile("c:\test.txt",1,false)
x=t.ReadAll
t.close
Response.Write("The text in the file is: " & x)
%>
Output:
The text in the file is: Hello World!
❮完全なTextStreamオブジェクトリファレンス