Write 方法
时间:2007-12-27 来源:不详 作者:林子
将给定的字符串写入到一个 TextStream 文件。 本文来自织梦
object.Write(string)
本文来自织梦
参数
object
copyright dedecms
必选项。总是一个 TextStream 对象的名称。 dedecms.com
string 织梦内容管理系统
必选项。要写入文件的文本。 织梦内容管理系统
说明
给定的字符串在写入该文件时不会在字符串之间插入空格或字符。可以使用 WriteLine 方法来写入一个换行符或以换行符结束的字符串。 织梦内容管理系统
下面的示例演示了Write 方法的用法: 内容来自dedecms
function WriteDemo() {
var fso, f, r
var ForReading = 1, ForWriting = 2;
fso = new ActiveXObject("Scripting.FileSystemObject")
f = fso.OpenTextFile("c:\\testfile.txt", ForWriting, true)
f.Write("Hello world!");
f.Close();
f = fso.OpenTextFile("c:\\testfile.txt", ForReading);
r = f.ReadLine();
return(r);
}内容来自dedecms
请参阅
WriteBlankLines 方法 | WriteLine 方法应用于: TextStream 对象
dedecms.com

上一篇:SkipLine 方法 下一篇:RemoveAll 方法
文章评论
共有位Admini5网友发表了评论 查看完整内容