ขั้นตอนการตั้งค่า OpenTextFile ของ ASP
การเฉพาะไว้และการใช้งาน
เปิดแฟ้มที่กำหนด และส่งคืนองค์ประกอบ TextStream ที่สามารถใช้เข้าถึงแฟ้มนี้
คำสั่ง
FileSystemObject.OpenTextFile(fname,mode,create,format)
ตัวแปร | คำอธิบาย |
---|---|
fname | สำคัญ |
mode | ทางเลือก
|
create | ทางเลือก |
format | ทางเลือก
|
รูปแบบตัวอย่าง
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.OpenTextFile(Server.MapPath("testread.txt"),8,true) f.WriteLine("This text will be added to the end of file") f.Close set f=Nothing set fs=Nothing %>