w3pop.com :: 网络学院 :: ASP :: ASP WriteLine 方法
The WriteLine method writes a specified text and a new-line character to a TextStream file.
ASP Write的作用是向文本文件中写入一段指定文本,并在书写完毕后自动换行。
| TextStreamObject.WriteLine(text) |
| Parameter 参数 |
Description 描述 |
|---|---|
| text | Optional. The text to write to the file. If you do not specify this parameter, a new-line character will be written to the file 可选参数。向文件中书写文本内容。如果没有指定这个参数的话,指定的文本将会另起一行输入 |
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateTextFile("c:test.txt",true)
f.WriteLine("Hello World!")
f.WriteLine("How are you today?")
f.WriteLine("Goodbye!")
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? Goodbye! |
评论 (0)
All