HELP: Nested include(...)'s take relative paths not intuitively

From: Date: Tue, 10 Feb 2004 18:55:24 +0000
Subject: HELP: Nested include(...)'s take relative paths not intuitively
Groups: php.general 
Request: Send a blank email to php-general+get-177308@lists.php.net to get a copy of this message
Hi there, I have 3 files in nested subdirectories (1) /test.php (2) /subdir1/test.php (3) /subdir1/subdir2/test.php (1) contains ////////////////////// <?php print "hello"; ?> (2) and (3) contains ///////////////////// <?php include("../test.php"); ?> if I call (3) it loops forever in (2) trying to including itself. I expected (2) correctly included (1) by taking the relative path referenced to its current location not the location of (3) which is including it. If I rename (1) as test1.php, (2) as test2.php and (3) as test3.php, then (2) fails to find and open (1). Is this a bug or a feature? I didnt find any reference to this in the online documentation. __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html

« previous php.general (#177308) next »