Re: register_globals = off and $PHP_SELF
| From: | scottrus at ipass dot net | Date: | Fri, 01 Sep 2000 19:28:11 +0000 |
| Subject: | Re: register_globals = off and $PHP_SELF | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14903@lists.php.net to get a copy of this message | ||
On Fri, Sep 01, 2000 at 09:58:18PM -0700, php3@developersdesk.com wrote:
> > This worked. I figured it had to be a simple solution. I kept shooting
> > for one line vars like $GLOBALS[HTTP_SERVER_VARS["PHP_SELF"]] whiched
> > just won't work it at all.
>
>
> That would be:
>
>
> $GLOBALS[ 'HTTP_SERVER_VARS' ][ 'PHP_SELF' ]
>
>
> $GLOBALS is an array that contains all the global variables, one of them
> is named HTTP_SERVER_VARS which is also an array. The whole thing can
> be accessed like a two dimensional array as shown above, or just do it
> the easy way and declare $HTTP_SERVER_VARS global like you have.
Interesting. Arrays have never been my strong point. :) Conceptually I
understand them fine, it's working within them and extracting data from
them that gets me thrown sometimes.
Thanks for the additional info.
--
Scott