RE: [PHP] preventing multiple includes

From: Date: Wed, 19 Jul 2000 21:21:05 +0000
Subject: RE: [PHP] preventing multiple includes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7347@lists.php.net to get a copy of this message
I usually just do something like this: <?php if(!isset($headerincluded)) { ?> <html><head> blah, blah. </head> <body> <?php $headerincluded = 1; } ?> Then if I screw up and include it twice, it just ignores it after the first time. Hans On Wed, 19 Jul 2000, Mark Roedel wrote: > > -----Original Message----- > > From: Angus Mackay [mailto:amackay@gusnet.cx] > > Sent: Wednesday, July 19, 2000 2:37 PM > > To: php-general@lists.php.net > > Subject: [PHP] preventing multiple includes > > > > > > what is the best solution for preventing multiple includes? > > It doesn't seem to be documented in the manual yet, but the include_once() > function mentioned in the changelog seems like it might be kinda > promising... > > > --- > Mark Roedel | "Blessed is he who has learned to laugh > Systems Programmer | at himself, for he shall never cease > LeTourneau University | to be entertained." > Longview, Texas, USA | -- John Powell > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > Hans Anderson ~ me@hansanderson.com PO Box 426, Missoula, MT 59806 | PHP, Search Engines, SQL (800)397-9116 / (406)549-6524 | Databases, Flash Multimedia, http://www.hansanderson.com | Killer Audio Production, http://www.goofiness.com | Minty Fresh Breath.

« previous php.general (#7347) next »