Re: Function redefine ?

From: Date: Sun, 07 Jan 2001 19:14:58 +0000
Subject: Re: Function redefine ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-33106@lists.php.net to get a copy of this message
Does that mean PHP3 users are bound to use just one include file? Anyway we having a new server soon with PHP4 - Thanks Mo, Abe ----- Original Message ----- From: "Moritz Petersen" <lists@jface.de> To: "Abe" <abe@fish.tm>; "PHP users" <php-general@lists.php.net> Sent: Sunday, January 07, 2001 6:57 PM Subject: RE: [PHP] Function redefine ? > Unfortuanteley, you are using PHP 3. > Since PHP 4.0.1pl2 there is a function called "include_once()", which lets > you include a file only once, even if there are multiple calls of > include_once(). > I am using include_once() to include every file I need. I don't have to care > about multiple inclusions or refining errors. > If you have a chance to use PHP 4, you should do it. > > Hope it helps, > Mo. > > > I have a file called menu.php3 - this file has one include file - > > file1.inc. > > Now I have another inlcude file that need to be used - file2.inc. > > > > If I include the file in menu.php3 then file1.inc does not seem to be able > > to access the functions in it. > > > > I don't want to include the file in menu.php3 and file1.inc because then I > > get a redefining error. > > > > Is there an alternative to make the functions in one include file > > accessible > > from another include file? > > > > Thanks, > > Abe > > > > > > -- > > 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 > > >

« previous php.general (#33106) next »