RE: [PHP] $PHP_SELF name space?

From: Date: Mon, 25 Jun 2001 03:36:48 +0000
Subject: RE: [PHP] $PHP_SELF name space?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-55089@lists.php.net to get a copy of this message
$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

« previous php.general (#55089) next »