วิธีการเขียน ASP
❮ อ้างอิงวัตถุ TextStream ที่สมบูรณ์
วิธีเขียนจะเขียนข้อความที่ระบุลงในไฟล์ TextStream
หมายเหตุ:วิธีนี้จะเขียนข้อความลงในไฟล์ TextStream โดยไม่มีช่องว่างหรือตัวแบ่งบรรทัดระหว่างแต่ละสตริง
ไวยากรณ์
TextStreamObject.Write(text)
Parameter | Description |
---|---|
text | Required. The text to write to the file |
ตัวอย่าง
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateTextFile("c:\test.txt",true)
f.write("Hello World!")
f.write("How are you today?")
f.close
set f=nothing
set fs=nothing
%>
The file test.txt will look like this after executing the code above:
Hello World!How are you today?
❮ อ้างอิงวัตถุ TextStream ที่สมบูรณ์