把所有 textfile 改成 txtFile
你把对象变量名称写错了 真晕
修正后代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
创建文件事例 正在写入中 ....
<%
Set fso = Server.CreateObject("scripting.filesystemobject")
Set txtFile = fso.CreateTextFile(Server.MapPath("poem.htm"),true)
txtFile.writeLine ""
txtFile.writeLine ""
txtFile.writeLine "
镰?/title>"
txtFile.writeLine ""
txtFile.writeLine ""
txtFile.writeLine "
鏂规硶
"
txtFile.writeLine "
"
txtFile.writeLine "
vvv
"
txtFile.writeLine "
gg
"
txtFile.writeLine "
"
txtFile.writeLine ""
txtFile.writeLine ""
txtFile.close
%>
文件创建成功!请单击下面的连接打开该文件:
查看文件