RE: [PHP] Multiple pages including one Class...

From: Date: Tue, 28 Nov 2000 20:02:32 +0000
Subject: RE: [PHP] Multiple pages including one Class...
Groups: php.general 
Request: Send a blank email to php-general+get-27668@lists.php.net to get a copy of this message
> And if you do this: > GLOBAL $ThisLibraryDefined; > if( !$ThisLibraryDefined ) { > $ThisLibraryDefined = 1; > } > then it would also work if the include was called from within > a function. But only then. PHP doesn't like you using the GLOBAL keyword outside of a function. If you do, PHP will hack, spit and die. Generally, I don't "Include" or "Require" inside of a function. There is no reason to, IMO. If a function in one file is going to need a function in another, just include the second at the top of the code of the first. Again, IMO. Chris

« previous php.general (#27668) next »