php-general | 2001062

RE: [PHP] $PHP_SELF name space? From: Jason Lustig (lustig <email protected>)
Date: 06/24/01

$PHP_SELF is a global variable. You're trying to call it from inside a
function, which won't work unless you declare it as global to the function
(unless you have some thing in the php.ini file set that I don't remember
off the top of my head what it's called which will make all that stuff
global anyway). You've got to do:

class xCrumbs
{
   function Render(){
       global $PHP_SELF;
       echo $PHP_SELF;
    }
}
$crumbs = new xCrumbs();
$crumbs->Render();

--Jason

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>