欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

ASP CreateTextFile 方法

定義和用法

CreateTextFile 方法可在當(dāng)前文件夾中創(chuàng)建新的文本文件,并返回可用于讀或?qū)懳募?TextStream 對象。

語法:

FileSystemObject.CreateTextFile(filename[,overwrite[,unicode]])
FolderObject.CreateTextFile(filename[,overwrite[,unicode]])
參數(shù) 描述
filename 必需的。需創(chuàng)建文件的名稱。
overwrite 可選的。指示能否覆蓋已有文件的布爾值。True 指示可覆蓋文件,F(xiàn)alse 指示不能覆蓋文件。默認(rèn)是 True 。
unicode 可選的。指示文件是作為 Unicode 還是 ASCII 文件來創(chuàng)建的布爾值。True 指示文件作為 Unicode 文件創(chuàng)建,而 False 指示文件被作為 ASCII 文件創(chuàng)建。默認(rèn)是 False。

針對 FileSystemObject 對象的實(shí)例

<%
dim fs,tfile
set fs=Server.CreateObject("Scripting.FileSystemObject")
set tfile=fs.CreateTextFile("c:\somefile.txt")
tfile.WriteLine("Hello World!")
tfile.close
set tfile=nothing
set fs=nothing
%>

針對 Folder 對象的實(shí)例

<%
dim fs,fo,tfile
Set fs=Server.CreateObject("Scripting.FileSystemObject") 
Set fo=fs.GetFolder("c:\test") 
Set tfile=fo.CreateTextFile("test.txt",false) 
tfile.WriteLine("Hello World!")
tfile.Close
set tfile=nothing
set fo=nothing
set fs=nothing
%>