file system object question

Results 1 to 2 of 2

Thread: file system object question

  1. #1
    Join Date
    Dec 1969

    Default file system object question

    the asp board is down...<BR><BR>i keep getting this error<BR>Microsoft VBScript runtime error &#039;800a003e&#039; <BR><BR>Input past end of file <BR><BR>/asp/ex/refer2.asp, line 5 <BR><BR>with this code<BR><BR>&#060;%<BR>set objFileSys = Server.CreateObject("Scripting.FileSystemObject")< BR>Set objFile = objFileSys.GetFile(server.mappath("referers.txt")) <BR>Set objTs = objFile.OpenAsTextStream<BR>CurReferer = objTs.ReadALL<BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default Feels like...

    ...the file is empty.<BR><BR>Hence "input past end of [the nonexistent data in the] file".<BR><BR>Have you debugged?<BR><BR>And you can write this with one fewer steps. No need for the separate objFile adn objTs:<BR><BR>&#060;%<BR>set objFileSys = Server.CreateObject("Scripting.FileSystemObject")< BR>path = server.mappath("referers.txt")<BR>Response.Write "DEBUG: path is " & path & "&#060;HR&#062;"<BR>Set objFile = objFileSys.OpenTextFile( path )<BR>CurReferer = objFile.ReadALL<BR>%&#062;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts