Re: Multiple pages including one Class...
| From: | Daniel Convissor | Date: | Tue, 28 Nov 2000 00:41:13 +0000 |
| Subject: | Re: Multiple pages including one Class... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27527@lists.php.net to get a copy of this message | ||
Hey Roy:
Roy Nasser wrote:
>
> I am running into problems because Some pages try to include a file, and
> define a class which has already been defined...
>
> Is there a SURE way to make this type of error not happen?
Well, there are a couple options.
1) include_once();
2) if ( !isset($ObjectName) ) {
$ObjectName = new Object;
}
3) The best option is to rework the program's logic. Things are
obviously too convoluted.
Enjoy,
--Dan
--
PHP scripts that make your job easier
http://www.analysisandsolutions.com/code/
SQL Solution | Layout Solution | Form Solution
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409