Re: {include_php} and $PHP_SELF

From: Date: Tue, 12 Mar 2002 14:51:06 +0000
Subject: Re: {include_php} and $PHP_SELF
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3012@lists.php.net to get a copy of this message
On Mon Mar 11 11:40:57 2002 CET Bertrand DUNOGIER wrote: > 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... Hi, Actually register_globals only influences user submitted data like $_GET, $_POST and $_SESSION, but $PHP_SELF is a php var and it should be always available. My server runs with register_globals=off and $PHP_SELF is available in all scripts except the script I included from a template. Is it possible, that the {include_php} overrides $PHP_SELF? On the other hand using $_SERVER['PHP_SELF'] is absolutely OK for me, I only wanted to know if I can rely on its availability ;). thanks Carsten -- Carsten Saathoff ...powered by Linux ICQ #52558095 The gods are great, I am the greatest! (Borknagar)

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