Re: $PHP_SELF problem

From: Date: Tue, 20 Apr 2004 12:12:28 +0000
Subject: Re: $PHP_SELF problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-183955@lists.php.net to get a copy of this message
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 (#183955) next »