最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp fso:创建文件 CreateTextFile 实例教程
时间:2022-06-30 11:42:22 编辑:袖梨 来源:一聚教程网
asp fso:创建文件 CreateTextFile 实例教程
CreateTextFile方法创建一个新的文本文件在当前文件夹中,并传回TextStream物件,可以用来读取或写入档案。
语法
语法
FileSystemObject.CreateTextFile(filename[,overwrite[,unicode]])
FolderObject.CreateTextFile(filename[,overwrite[,unicode]])
| Parameter | Description |
|---|---|
| filename | Required. The name of the file to create |
| overwrite | 任择。一个布尔值,表明是否现有的文件可以被覆盖。真正表明该文件可以覆盖和虚假表明该文件不能被覆盖。预设值是true |
| unicode | 任择。一个布尔值,表明是否文件被创建为Unicode或ASCII文件。真指出,档案是创建一个Unicode文件,虚假表明该文件是创建一个ASCII文件。默认值为false |
对文件操作教程.
<% 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 %>对文件夹操作教程.<% 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 %>
相关文章
- 腾讯start云游戏怎么玩剑灵 06-10
- yy漫画官方登录页面免费进入 yy漫画官方登录界面免费入口免费 06-10
- archiveofourhome官方入口点击直达中文版 06-10
- Stable Diffusion开发者适合哪些场景?5种应用对比 06-10
- 今日头条app任务中心入口在哪儿_今日头条app做任务赚福利位置 06-10
- 超星泛雅学生通平台登录入口 超星学习学生通官网入口 06-10