Re: nested includes fails?
| From: | Tumurbaatar S. | Date: | Thu, 06 May 2004 04:25:21 +0000 |
| Subject: | Re: nested includes fails? | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9676@lists.php.net to get a copy of this message | ||
Yes, mine works too. After you
reply I tested it without abs paths
and that worked. May be there was
some error in my include scripts because
after my 1st post I did many changes
in them. Though I wonder what was wrong
in my prior code.
Thank you all!
"Jevon Wright" <jevon@jevon.org> wrote in message
news:059b01c4326a$bc9f3890$0a00a8c0@home.jevon.org...
> I tried this and it didn't fail...
>
> Jevon
>
> ----- Original Message -----
> From: "Tumurbaatar S." <tumurbaatar@datacom.mn>
> To: <internals@lists.php.net>
> Sent: Wednesday, May 05, 2004 1:32 PM
> Subject: Re: [PHP-DEV] nested includes fails?
>
>
> > Hi, Jevon,
> > Mine is not so complex:
> >
> > //all files in 'inc' include 'common.php'
> > \inc\a.php
> > <?php
> > require_once("common.php");
> > class A { }
> > ?>
> > \inc\b.php
> > <?php
> > require_once("common.php");
> > class B {}
> > ?>
> >
> > //common.php does not include anything
> > \inc\common.php
> > <?php
> > class C { }
> > ?>
> >
> > //this works. Main scripts include 'common.php' indirectly
> > \member\member.php
> > <?php
> > require_once("../inc/a.php");
> > ?>
> >
> >
> > //this fails:redeclaration of class C
> > \member\member3.php
> > <?php
> > require_once("../inc/a.php");
> > require_once("../inc/b.php");
> > ?>
> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >