Anyone know something that does it? I can use include, but I think a readfile would be better, and the files I will be reading/including have a query string on them.
dim readtext
Set FS = Server.CreateObject("Scripting.FileSystemObject")
Set RS = FS.OpenTextFile(Server.MapPath("text") & "\test.txt",1)
While not RS.AtEndOfStream
readtext = RS.ReadLine()
response.write readtext & "<br>"
Wend
The content of whatever you read in may have to be altered depending on what you do with it. For instance outputing it to the screen may result in odd behavior if the content contains markup that the browser tries to interpret.
Or if the data contains quotes and you try to work with it in ASP the quotes might screw up your string so you would have to escape any characters that might cause you issues. It all depends on the data and what you do with it.
At my age I still learn something new every day, but I forget two others.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.