日期:2014-05-17  浏览次数:20935 次

实在没分了,大家帮我看一下吧,谢谢了很简单的~
错误的文件模式  

/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
%>