-
i've been struggling to get this to work for about a wekk now. i bvelieve the ISP is set up properly so i don't really know what else to suspect other than my ASP script. the ASP is supposed tor receive variable sent from a text feild inb flash (using post) and then write them to one text file called rates.txt.
here is the code; if anyone can tell me what is wrong i'd be most gratefull
i fell conquered,
pete
<%
' global variables
filepath = "C:/inetpub/mortgage/"
filename = "rates.txt"
' open filesystem object
Set FS = CreateObject("SCRIPTING.FileSystemObject")
' delete existing file
if FS.fileExists(filepath & filename) = TRUE then
FS.deleteFile(filepath & filename)
end if
' create new file
set MYFILE = FS.openTextFile(filepath & filename, 8, TRUE)
MYFILE.writeLine request.FORM
' close and destroy objects
MYFILE.Close
set MYFILE = nothing
set FS = nothing
' redirect the user to another section of the web site
response.redirect "/test.html"
%>
-
The reason for not working is because the asp script is not getting the file rates.txt in the location.
The exact location of the file may vary depending upon the server. To determine the exact physical path use the following ASP code
filepath=Server.MapPath("rates.txt")
For writing to the file use 2(for writing) as a constant rather than 8(for appending).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|