当前位置: 代码迷 >> ASP >> 实在没分了,大家帮小弟我看一下吧,多谢了很简单的
  详细解决方案

实在没分了,大家帮小弟我看一下吧,多谢了很简单的

热度:212   发布时间:2012-02-27 10:00:22.0
实在没分了,大家帮我看一下吧,谢谢了很简单的~
错误的文件模式  

/cs/22222222.asp,行   19

<%   dim   texta,textb
      set   fobj=server.Createobject( "scripting.filesystemobject ")
      set   texta=fobj.createtextfile(server.mappath( "result.txt "),true)
                  texta.writeline( "0 ")
                  texta.writeline( "1 ")
                  texta.writeline( "2 ")
          texta.writeline( "3 ")
  texta.close
      set   texta=fobj.opentextfile(server.mappath( "result.txt "),2,false)  
                      Response.write( "readline: "&   texta.readline   &   " <br> ")
    Response.write( "readline: "&   texta.readline   &   " <br> ")
    Response.write( "readline: "&   texta.readline   &   " <br> ")
    Response.write( "readline: "&   texta.readline   &   " <br> ")
      texta.close
%>

------解决方案--------------------
你参数设置有问题,你对比一下你的参数,给你改过来了:
<% dim texta,textb
set fobj=server.Createobject( "scripting.filesystemobject ")
set texta=fobj.createtextfile(server.mappath( "result.txt "),1,2)
texta.writeline "0 "
texta.writeline "1 "
texta.writeline "2 "
texta.writeline "3 "
texta.close
set texta=fobj.opentextfile(server.mappath( "result.txt "),1,false,-2)
Response.write( "readline: "& texta.readline & " <br/> ")
Response.write( "readline: "& texta.readline & " <br/> ")
Response.write( "readline: "& texta.readline & " <br/> ")
Response.write( "readline: "& texta.readline & " <br/> ")
texta.close
%>
  相关解决方案