RE: nested includes

From: Date: Thu, 03 Jan 2002 12:36:48 +0000
Subject: RE: nested includes
Groups: php.general 
Request: Send a blank email to php-general+get-79303@lists.php.net to get a copy of this message
Include will act relative to the path of the script not the included file that the include is in. If you have an include in a file which is itself included and which isn't always called from files in the same directory you need to make the include path absolute rather than relative. I hope that makes more sense to you than it does to me Tim www.chessish.com <http://www.chessish.com> ---------- From: V [SMTP:avmaturana@quarkinside.com] Sent: 03 January 2002 11:47 To: php-general@lists.php.net Subject: nested includes I have this tree: myroot | |--folderone | | | |--foldertwo | | | | | |--archivethree.php | | | |--archivetwo.php | |--archiveone.php I need to include archiveone.php: In archivetwo.php I make one include: include("../archiveone.php"); In archivethree.php I make another include: include("../archivetwo.php"); It gives me an error: Failed opening '../archiveone.php' for inclusion (include_path='') in c:\mycompletepath\mypath\folderone\foldertwo.php on line 2 I have read about this but i can't find a valid solution. Any ideas? _______________________________________________________ Antonio Vicente Maturana _______________________________________________________ Powered by Sambar Webmail - http://www.sambar.com)

« previous php.general (#79303) next »