亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

ASP OpenTextFile 方法

定義和用法

OpenTextFile 方法打開(kāi)指定的文件,并返回可用來(lái)訪問(wèn)此文件的 TextStream 對(duì)象。

語(yǔ)法:

FileSystemObject.OpenTextFile(fname,mode,create,format)
參數(shù) 描述
fname 必需的。要打開(kāi)的文件的名稱(chēng)。
mode 可選的。如何打開(kāi)文件。
  • 1=ForReading - 打開(kāi)文件用于讀取數(shù)據(jù)。您無(wú)法向此文件寫(xiě)數(shù)據(jù)。
  • 2=ForWriting - 打開(kāi)文件用于寫(xiě)數(shù)據(jù)。
  • 8=ForAppending - 打開(kāi)文件,并向文件的末尾寫(xiě)數(shù)據(jù)。
create 可選的。設(shè)置如果文件名不存在,是否創(chuàng)建新文件。True 指示可創(chuàng)建新文件,而 False 指示新文件不會(huì)被創(chuàng)建。False 是默認(rèn)的。
format 可選的。文件的格式。
  • 0=TristateFalse - 以 ASCII 打開(kāi)文件。默認(rèn)。
  • -1=TristateTrue - 以 Unicode 打開(kāi)文件。
  • -2=TristateUseDefault - 使用系統(tǒng)默認(rèn)格式打開(kāi)文件。

實(shí)例

<%
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
%>