RE: [PHP] $DOCUMENT_ROOT -- didn't work from a class..

From: Date: Wed, 30 Aug 2000 09:55:29 +0000
Subject: RE: [PHP] $DOCUMENT_ROOT -- didn't work from a class..
Groups: php.general 
Request: Send a blank email to php-general+get-14349@lists.php.net to get a copy of this message
> <?php > > class Foo > { > var $docRoot = $GLOBALS['DOCUMENT_ROOT']; > > function Bar() > { > return $docRoot; > } > } > > $obj = new Foo; > print $obj->Bar(); > > ?> Helps if you "global $docRoot" inside the function... Jason -- Jason Murray jasonm@melbourneit.com.au Web Design Team, Melbourne IT Don't believe everything you're foretold.

« previous php.general (#14349) next »