当前位置: 代码迷 >> ASP >> 请大侠帮忙看一下下面两段程序,错在哪里,该如何处理
  详细解决方案

请大侠帮忙看一下下面两段程序,错在哪里,该如何处理

热度:251   发布时间:2012-03-03 15:33:04.0
请大侠帮忙看一下下面两段程序,错在哪里,急急!
32.asp

<HTML>
<HEAD> 在线接龙 </head>
<body   bgcolor= "#ffffff ">
<hr>

<%
set   myfileobject=server.createobject( "scripting.systemobject ")
set   mytext=myfileobject.opentextfile(server.mappath( "/create.txt "),1,false)
while   not   mytext.atendofline
      response.write(mytext.readline)
wend
mytext.close
%>
<hr>
<h3> 请输入这个故事的新行: </h3>
<form   method= "post "   action= "33.asp ">
<input   name= "nextline "   type=text   size= "70 ">
<input   type=submit   value= "确定添加这一句 ">

</form>

</body>
</HTML>


33.asp


<HTML>
<HEAD> age   count </head>
<body   bgcolor= "#ffffff ">
<br>
<%
if   not   request.form( "nextline ")= " "   then
set   myfileobject=server.createobject( "scripting.filesystemobject ")
set   mytextfile=myfileobject.opentextfile(server.mappath( "/create.txt ",8,true)
mytextfile.writeline(request.form( "nextline "))
mytextfile.close
end   if

%>

</body>
</HTML>



------解决方案--------------------
server.createobject( "scripting.systemobject ")
应该是server.createobject( "scripting.filesystemobject ")
  相关解决方案