Re: register_globals = off and $PHP_SELF

From: Date: Sat, 02 Sep 2000 04:58:18 +0000
Subject: Re: register_globals = off and $PHP_SELF
Groups: php.general 
Request: Send a blank email to php-general+get-14901@lists.php.net to get a copy of this message
Addressed to: scottrus@ipass.net php-general@lists.php.net ** Reply to note from scottrus@ipass.net Fri, 1 Sep 2000 16:45:56 +0500 > > On Fri, Sep 01, 2000 at 01:38:05PM -0700, Christopher Thompson wrote: > > I think you need to add this to your fucntion or class: > > > > global $HTTP_SERVER_VARS; > > > > 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. For more info on using arrays: http://www.php.net/manual/html/language.types.array.html Rick Widmer Internet Marketing Specialists www.developersdesk.com

« previous php.general (#14901) next »