ASP WriteBlankLines 方法

定义和用法

WriteBlankLines 方法向 TextStream 文件写入指定数目的新行字符。

语法:
  1. TextStreamObject.WriteBlankLines(numlines)
参数描述
numlines必需的。要写入文件的新行字符的数目。

实例

  1. <%
  2. dim fs,f
  3. set fs=Server.CreateObject("Scripting.FileSystemObject")
  4. set f=fs.CreateTextFile("c:\test.txt",true)
  5. f.WriteLine("Hello World!")
  6. f.WriteBlankLines(2)
  7. f.WriteLine("How are you today?")
  8. f.close
  9. set f=nothing
  10. set fs=nothing
  11. %>

在执行上面的代码后,文件 test.txt 的内容为:

  1. Hello World!
  2. How are you today?

分类导航