Re: Includes

From: Date: Fri, 19 May 2000 18:34:53 +0000
Subject: Re: Includes
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-215@lists.php.net to get a copy of this message
Thanks a lot. Victor Zak Greant wrote: > At 02:15 PM 5/19/00 -0400, you wrote: > >I can't find include_once() in the docs. > > It isn't in the docs yet. The only mention of it is in the source code for > PHP. > > >Is this a suppoted function in > >PHP4? > > It is supported in PHP 4 - I tried it in RC2 before my initial post about it. > > >Where can I read about it? > > If you understand C, then you can download the PHP4 source code and dig > through that... As near as I can figure, if you call it once, it includes > the file specified as an argument. > > i.e. include_once ('some_file_name.inc'); > > If you call the function a second time, then nothing happens. > > HTH, > > Zak > > >Zak Greant wrote: > > > > > At 12:46 PM 5/19/00 -0400, Victor wrote: > > > >Is there an equivalent of java's import in php?? > > > > > > > >I want to include a file that has a class. If I accidently include it > > > >twice (like I inlude another file that has the same include in it), i > > > >get errors. I currently use DEFINES (kind of like C) to stop that form > > > >happaning. Will php have any construct (I think perl has this) that if > > > >file is included once, all subsequent includes are ignored? > > > > > > If you are using PHP4, you can include use include_once() > > > > > > HTH, > > > > > > Zak > > > > > >-- > >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 > > -- > 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 (#215) next »