skij
asked on
Classic ASP: Write to file
Using Classic ASP, how can I create a file in the current directory?
This returns an error:
This returns an error:
<%
set oFs = server.createobject("Scripting.FileSystemObject")
set oTextFile = oFs.OpenTextFile(Server.MapPath(".") & "\Test.txt", 2, True)
oTextFile.Write "Test Content"
oTextFile.Close
set oTextFile = nothing
set oFS = nothing
Response.Write("-- Done --")
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
in IIS, in the ASP section, under debugging, there's an option to send errors to the browser.
my guess is it's a permissions issue
my guess is it's a permissions issue
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Open in new window
Even these two lines, with no other lines, cause the same error:Open in new window
How can I debug this and solve the problem? Thanks.