I want to view a txt document that is not a save file. For example, if I want to view the bugs in my game, it will go into this file by the users:
BugLog.txt
Now is there a way I can make it so that I can read the file in the game instead of the host having to upload it and send it to me?
|
||||||||||||||||||
This should open the file "BugLog.txt" in the game's directory. You could also output it to an output control, ftp() it to the user, ect.
var/filename = "BugLog.txt"var/contents
if(fexists(filename))
contents = html_encode(file2text(file(filename)))
else
contents = "<b>File Not Found</b>"
src<<browse("<pre>[contents]</pre>")