RE: [PHP] Creating a global variable for all PHP pages?

From: Date: Thu, 21 Mar 2002 06:07:36 +0000
Subject: RE: [PHP] Creating a global variable for all PHP pages?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-89462@lists.php.net to get a copy of this message
The short answer - efficiency. The FAQ has a more elaborate explanation. -----Original Message----- From: Martin Towell [mailto:martin.towell@world.net] Sent: Thursday, March 21, 2002 12:14 AM To: 'Lance Lovette'; Warrick Wilson; php-general@lists.php.net Subject: RE: [PHP] Creating a global variable for all PHP pages? what about a common include file? -----Original Message----- From: Lance Lovette [mailto:lance.php@dailydiary.com] Sent: Thursday, March 21, 2002 4:00 PM To: Warrick Wilson; php-general@lists.php.net Subject: RE: [PHP] Creating a global variable for all PHP pages? Take a look at this PHP extension and see if it will help solve your problem. It doesn't work on Windows yet though... http://pwee.sourceforge.net Lance -----Original Message----- From: Warrick Wilson [mailto:wwilson@fredsystems.com] Sent: Thursday, February 21, 2002 2:49 PM To: php-general@lists.php.net Subject: [PHP] Creating a global variable for all PHP pages? I want to define a variable that I can reference on ALL of my PHP pages. Ideally, I'd like to do it in php.ini or some similar place so that I can modify it as I place code on different systems, but not need to make changes in lots of different places. I looked at the Configuration section of the manual, did web searches, tried getenv() and using the OS environment (we're mixed Windows and UNIX boxes, using Apache and mysql and PHP 4.1.1), and had zero luck. I was hoping that getenv() or _ENV[] would have worked. I tried creating something in php.ini by simply adding a line, with no luck. Is there some way of doing this? Warrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#89462) next »