Variable for path to functions script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
j0hn
Forum Newbie
Posts: 7
Joined: Sun Jul 01, 2007 7:51 am

Variable for path to functions script

Post 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
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Post by califdon »

How about an include file that you include at the top of each script?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Post Reply