Re: include path confusion

From: Date: Thu, 11 Jan 2001 23:55:07 +0000
Subject: Re: include path confusion
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-34157@lists.php.net to get a copy of this message
Thursday, January 11, 2001, 11:03:31 AM, you wrote: BC>> Using PHP 3.0.18, every, single time I've used something like: BC>> include('../farmers/underwear.php'); BC>> It works as expected. BC> I'm half alseep. I see what you're saying. I suppose if you did: BC> include('corn.php'); BC> It's going to try each path. Ie. ".:/include:/usr/src" BC> ./corn.php BC> (if not in .) /include/corn.php BC> (if not in /include) /usr/src/corn.php BC> (if not in /usr/src) Error. BC> And I *suspect* that even if you use ../corn.php, it's going to try BC> the include paths in the same way. BC> ../corn.php is equivalent to ./../corn.php There's the real confusion I'm having. If you use ../corn.php it *appears* to then try ./include/../corn.php then /usr/src/../corn.php then error, whether the file was in any of those directories or not (since those aren't valid directory references). However, I see some includes I use with the extra path work and some don't. I just wish they would document this so I knew for sure. BC> -Brian BC> -- BC> Like punning, programming is a play on words.

« previous php.general (#34157) next »