Guest_imported
New member
- Jan 1, 1970
- 0
I am new to ASP. I bought a book and started programming this:
<%@ Language=VBScript%>
<% option explicit %>
<% Response.Buffer = True %>
<%
Dim fs
Dim ts
Dim s
Dim aFile
aFile = "set fs = server.CreateObject("Scripting.FileSystemObject"
set ts = fs.OpenTextFile(aFile,ForReading,False)
s = ts.readall
ts.close
set ts=nothing
Response.Write s
%>
*Note that nlam700 is my local server where the file castle.html is found.
Now when I run this program I get the following:
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'ForReading'
/scripts/rippage.asp, line 13
RIGHT!! How am I to open a file, if ForReading doesn't work?? Did I forget to include a file or something? pls help
<%@ Language=VBScript%>
<% option explicit %>
<% Response.Buffer = True %>
<%
Dim fs
Dim ts
Dim s
Dim aFile
aFile = "set fs = server.CreateObject("Scripting.FileSystemObject"
set ts = fs.OpenTextFile(aFile,ForReading,False)
s = ts.readall
ts.close
set ts=nothing
Response.Write s
%>
*Note that nlam700 is my local server where the file castle.html is found.
Now when I run this program I get the following:
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'ForReading'
/scripts/rippage.asp, line 13
RIGHT!! How am I to open a file, if ForReading doesn't work?? Did I forget to include a file or something? pls help