Re: nested include_once()
| From: | Roko Roic | Date: | Wed, 28 Nov 2001 11:02:25 +0000 |
| Subject: | Re: nested include_once() | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-75876@lists.php.net to get a copy of this message | ||
> in lib.php
> define("__LIB_PHP__",1);
> in service.php:
> define("__SERVICE_PHP__',1);
> if (!__LIB_PHP__){
> require('lib.php');
I am not sure I was clear enough.
I _want_ those include_once('lib.php') statements to be in service.php,
because service.php could get included from a file other than main.php,
let's say non_main.php.
That file (non_main.php) does not contain a statement
include_once('lib.php'), but only include_once('service_php') and so in
order to use that library, service.php has to include it itself.
Clear? :)
So, I am trying to find out what happens in case of main.php which includes
lib.php and service.php (which also includes lib.php) when I use
include_once(). Does it get included TWICE?
Roko