Page 2 of 2

Posted: Wed Mar 23, 2005 4:38 pm
by Roja
Ambush Commander wrote: Err... I'm not exactly sure what that INI setting does, but I don't think that's what I meant. Basically, if you're opening files with relative paths, it's imperative that the paths are resolved as if they originated from the root directory (that's why cross linking between directories is a nightmare for me). I think chdir() does the trick.
It sets the include path to the current working directory of the script.

So, if your app is in:

/home/~Roja/public_html

Thats what the include_path will be.

By doing so, you ensure that you can use relative paths (relative to the install dir of your app), and that you don't need to worry about various server settings. :)
Ambush Commander wrote:Ah, I see. Then wouldn't that config edit just be the same as the default?
You'd *think* so, wouldnt you?

I came across it after several users reported problems in my game related directly to that setting. Long story short, their default wasnt the default.

Never assume a default is universal. :)

Posted: Wed Mar 23, 2005 4:43 pm
by feyd
Roja wrote:Never assume a default is universal.
sooooooo true. :)

my mentality: If you didn't set it yourself, it's another variable to deal with in the probability of rolling those dice.

Posted: Wed Mar 23, 2005 4:44 pm
by Ambush Commander
I came across it after several users reported problems in my game related directly to that setting. Long story short, their default wasnt the default.

Never assume a default is universal.
Intriuging! Very counterintuitive.

Although if I'm going to end up changing the include_path on runtime, I'll probably just set it to the home directory so that things are consistent.