FILES: Relative path
#1

Hi guys,
Do any of you know of opening a file with fopen() that is in the parent directory of scriptfiles; i.e. Say i wanted to open "samp.ban" in the server root folder, how would i go about doing that?
Thanks in advance,
Jonrb
Reply
#2

the path would probably be "../samp.ban"
Reply
#3

You cannot open files that are not in the scriptfiles directory with native file functions.

My server uses a Core addon folder, and I wanted to place my files that held coordinates there too, but it wouldn't read from

"../EUX scripts/" (SAMP ROOT/EUX scripts/)

Instead I have to use "/EUX configs/" (SAMP ROOT/SCRIPTFILES/EUX configs/)

Really need an answer myself tbh.
Reply
#4

I save my bans in one of my self-created server logs. You might want to try that.
Reply
#5

Quote:
Originally Posted by Hiddos
I save my bans in one of my self-created server logs. You might want to try that.
The bans aren't the problem, i was using an example. Thanks for the suggestion anyway!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)