Greetings alls...
I'm using this code to display certain files, but whenever the filename contains a "," then I get an error on following line whichfile = server.mappath("poems/"&whichfile)
how do I change the code so that ALL files with valid windows charachters in it can be displayed as well?
My codes look like something a kid wrote
I have absolutely no idea what I am talking about
Somehow I still manage to make it work
I'm using this code to display certain files, but whenever the filename contains a "," then I get an error on following line whichfile = server.mappath("poems/"&whichfile)
how do I change the code so that ALL files with valid windows charachters in it can be displayed as well?
Code:
whichfile = RS("filename")
Call ReadDisplayFile(whichfile)
SUB ReadDisplayFile(FileToRead)
whichfile = server.mappath("poems/"&whichfile)
Set fs = CreateObject("Scripting.FileSystemObject")
Set thisfile = fs.OpenTextFile(whichfile, 1, False)
tempSTR = thisfile.readall
response.write tempSTR
thisfile.Close
set thisfile=nothing
set fs=nothing
end sub
I have absolutely no idea what I am talking about
Somehow I still manage to make it work