Re: $PHP_SELF problem

From: Date: Tue, 20 Apr 2004 10:10:42 +0000
Subject: Re: $PHP_SELF problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-183956@lists.php.net to get a copy of this message
http://ie.php.net/globals Instead of $PHP_SELF use $_SERVER['PHP_SELF'] Craig "Red Wingate" <redeye@erisx.de> wrote in message news:20040420100811.28644.qmail@pb1.pair.com... > john@johnallsopp.co.uk wrote: > > > Hi > > > > $thisFileName = $PHP_SELF; works in a file just a few lines after the > > program start. > > > > $thisFileName = $PHP_SELF; doesn't work (echo ("<p>Debug: self: > > $PHP_SELF</p>"); returns <p>Debug: self: </p>) if it's within > > function > > getNavigation() in the Navigation object called by another program. > > > You better check the docs on 'global' and $GLOBALS :-) > > -- red > > > Why? > > > > The Navigation object is called like this: > > include ("Navigation.php4"); > > $myNavigation = new Navigation ("a", "b"); > > $myNavigation->getNavigation(); > > > > I guess I'm asking $PHP_SELF something confusing. Does it respond > > "index.php4" which is where the above three lines reside, or > > Navigation.php4 which is where the actual $PHP_SELF resides. > > > > All help appreciated :-) > > > > Cheers > > J

« previous php.general (#183956) next »