Re: {include_php} and $PHP_SELF

From: Date: Mon, 11 Mar 2002 10:40:57 +0000
Subject: Re: {include_php} and $PHP_SELF
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3009@lists.php.net to get a copy of this message
CS> I just used the built-in function {inlucde_php} and realized, that CS> $PHP_SELF isn't defined in the included php script, although CS> $_SERVER['PHP_SELF'] is available and points to the right place. the configuration variable register_globals is probably set to off on the version of PHP you are running. if register_globals == on, $PHP_SELF is defined. if it is set to off, $_SERVER['PHP_SELF'] is defined. It goes the same way for $_POST, $_GET... CS> I haven't found a hint in the manual, why $PHP_SELF isn't defined, and CS> so I'm wondering, what the reason is. Especially if the use of CS> $_SERVER['PHP_SELF'] as an alternative is ok or if there could arise CS> any problems? No, using these arrays is OK, and is way better than setting register globals to on. -- Bertrand mailto:bdunogier@wanadoo.fr INTERACT 21, rue de Pont Remy L-2423 Luxembourg mailto:bdunogier@wanadoo.fr

« previous php.smarty.general (#3009) next »