Re: nested includes()...

From: Date: Tue, 09 Oct 2001 10:54:52 +0000
Subject: Re: nested includes()...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-70441@lists.php.net to get a copy of this message
> I have a file x.php that includes a.inc, and a.inc includes b.inc... > > if I have a file dir/z.php including ../a.inc it doesn't work cuz it won't > find b.inc... > > how can I get around this??? in file dir/z.php do: <? chdir( ".." ); include( "a.inc" ); chdir( "dir" ); ?> This way all included files have proper current working directory and are able to include anything else (not depending on above 'dir' directory structure, so it's movable structure). The only problem is that 'z.php' has to be aware that it's in 'dir' directory. Kamil 'Hilarion' Nowicki

« previous php.general (#70441) next »