Code:
Problem description:
Essentially, I have player logs from in game, and they currently save as directed in the code
Data/Players/(player key)
Now, this folder is created inside the host folder. What I am trying to do is to see if it is possible to save these log files outside of the host folder, and essentially, say the directory path that I want it to save.
My game is hosted through ByondPanel, and I'd like the log files to save into the www folder.
Thanks for your time.
Doing it via PHP is completely possible, I believe OP already contacted us and I've given that solution.
http://php.net/manual/en/function.file-get-contents.php |
I've tried the file-get-contents route, and it doesn't seem to work.
I have a file explorer javascript that I am using to view player logs easily and efficiently. Currently, I am copy and pasting logs into a folder inside the webroot for it to work, but I am trying to streamline the process and cut out the added step. Currently, in my php, I have $dir = 'Logs'; I've tried editing this to $dir = file_get_contents('../'); and it doesn't find any files |
I don't believe ByondPanel would allow that.
However, this isn't true for things like Python/PHP/whatever, you could use a script to copy the files from the game directory to the www directory.
The game obviously wouldn't be able to access them in the www directory though.