-
I am using the file system object's CreateTextFile method to create a text file. Everything goes fine in the script, it displays the message it should saying the file was created, but it isn't. Do I need to specify the path like "http://www.myserver.com/folder/filename" or the path on the server itself, like "C:\webpagedir\folder\filename"? Are there any permissions that need to be set?
-
You can use Server.MapPath to specify the path for your file.
-
in further detail:
Code:
Server.MapPath("foldername/filename.txt")
and if you are already in the folder... for instance www.yoursite.com/foldername/
you would only need to do this:
Code:
Server.MapPath("filename.txt")
-
What if the file doesn't yet exist?
-