Page 1 of 1

Variable for path to functions script

Posted: Mon Aug 06, 2007 11:39 am
by j0hn
I'm fairly new to both programming and php so I apologise if this is a stupid question or if the information is readily available (I have looked and can't find it but could be using incorrect terms).

I have a local test system for my site and I want to be able to to all development on it. To save keystrokes I want to create a variable that contains the path to a functions file (the path will be different on my test system compared to live), I want the variable to be available to any script in any scope.

I believe a superglobal is what I'm looking for but I can't find details of how to create one, I suspect that you can't which is why I can't find any references. Is there another way?

Many thanks

Posted: Mon Aug 06, 2007 12:40 pm
by califdon
How about an include file that you include at the top of each script?

Posted: Mon Aug 06, 2007 3:05 pm
by feyd