DEFINE on entire site = Problem

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
User avatar
Calimero
Forum Contributor
Posts: 310
Joined: Thu Jan 22, 2004 6:54 pm
Location: Milky Way

DEFINE on entire site = Problem

Post by Calimero »

I looked at "The Manual" :D , and its strait-forward - it works.

My DEFINE-ing is in include file = languages.inc, and that file is included in the index.php ( just to give some background )

I need this:

How to make the constants available on all the pages of the web site - I intented to define them just this time and expected for them to be available on the entire site.

$SOLUTION_TO_ME = (Can this be done with DEFINE) ? 'code or instructions' : 'alternate way';


Thanks ahead !
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

As far as I am aware you have two options...

1) Load the include on every page.
2) Store the necessary values in a session.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yeah.. pretty much you need to include the file that defines them on all pages you wish to use the defines on..
Post Reply