Re: user-defined superglobals
| From: | Michael Gale | Date: | Sun, 04 Jul 2004 06:27:06 +0000 |
| Subject: | Re: user-defined superglobals | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-189658@lists.php.net to get a copy of this message | ||
Hello,
I am not a programmer so I do not know if you can create a "superglobal
variable". I am sure there is a problem with this ... any ways I user:
"require("db_access.php");"
at the top of all my pages that require db access for a application that
way the db access gets set on a per page bases. Which would be safe then
a superglobal one.
Michael.
On Sun, 4 Jul 2004 14:22:09 +0800
Michael Collins <lists@kuwago.com> wrote:
> I am relatively new at PHP and wondering why there is no mechanism to
> create user-defined superglobals? For example in ASP.Net I can setup
> a global.asa to define database connections or any named value I want
> to be available anywhere in an application. It would be great to have
> something like that in PHP.
>
> --
> Michael
> __
> ||| Michael Collins
> ||| Kuwago Inc
> ||| Singapore and Seattle USA
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>