Re: Always global variables
| From: | Uri Even-Chen | Date: | Tue, 10 Jul 2001 16:03:44 +0000 |
| Subject: | Re: Always global variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-57183@lists.php.net to get a copy of this message | ||
define() is for constants. I am refering to variables (which can change
during the program execution). Is there a way to declare them as global?
Uri.
Maxim Maletsky wrote:
>
> use define()
>
> Sincerely,
>
> Maxim Maletsky
> Founder, Chief Developer
> PHPBeginner.com (Where PHP Begins)
> maxim@phpbeginner.com
> www.phpbeginner.com
>
> -----Original Message-----
> From: Uri Even-Chen [mailto:webmaster@speedy.co.il]
> Sent: Monday, July 09, 2001 6:29 PM
> To: php-general@lists.php.net
> Subject: [PHP] Always global variables
>
> To PHP-general group,
>
> Is there a way to define specific variables as "always global", without
> needing to define them as global at each function separately? For
> example, these variables are always global on my scripts, so I have to
> include this line in each function:
>
> // Global Variables.
> global $SPEEDY_GLOBAL_VARS, $HTTP_ENV_VARS, $HTTP_GET_VARS,
> $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS;
>
> Is there a way to define them only once globally?
>
> Thanks,
>
> Uri Even-Chen
> Speedy Software
> Raanana, Israel.
> --------------------------------------------------------
> Welcome to Speedy Net (In Hebrew):
> http://www.speedy.co.il/
> Speedy Dating (In Hebrew):
> http://dating.speedy.co.il/
> Speedy Composer (In English):
> http://www.speedy.co.il/composer/
> --------------------------------------------------------
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net