And a second question, while I'm at it 🙂 In my script, people have the option of uploading an .html or .txt file. I would like whichever they upload to be saved as a .txt file. So, what are my best options to do this?
I've looked at copy() but the thing I don't like about is that the path has to be set/indicated for the server, and since I intend to distribute this script, I want it to be as easy as possible (and people always seem to have a hard time understanding the whole full path to your server thing). Is there a way to get around that with copy?
I've also looked at fwrite...I seem to be having a hard time understanding how to get it just write the file to the server...it writes a file to the server, but the only content is the name of the file, or other weird gibberish. After some poking around, it seems that fwrite is more useful or intended for writing content from a textbox in a form, no? Is there a way to just copy the file with fwrite? If so, any code snippets you could point me to?
Any other options I've missed?