Re: user-defined superglobals?
| From: | Mike Migurski | Date: | Sun, 24 Aug 2003 01:37:29 +0000 |
| Subject: | Re: user-defined superglobals? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-160554@lists.php.net to get a copy of this message | ||
>It would be nice to have a php-function like
>
>declare_superglobal($_MYFRAMEWORK);
>
>And then use $_MYFRAMEWORK like $_GET.
You have a few options: if you are looking to set variables that are
static and atomic, you can use environmental variables in an .htaccess
file (getenv() to access them) or you can use read-only constants
(define() to create them).
If you need a global read-write or array variable, just use $_GLOBALS:
use $_GLOBALS['_MYFRAMEWORK'] like $_GET, etc.
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html