Re: Re: Difficulty navigating symlinks

From: Date: Wed, 22 Oct 2008 22:26:25 +0000
Subject: Re: Re: Difficulty navigating symlinks
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-282302@lists.php.net to get a copy of this message
On 22 Oct 2008, at 22:45, Boyd, Todd M. wrote:
Haven't read the entire thread, but you might also look at http://php.net/manual/en/function.realpath.php
realpath() won't help since it will just controbute the same
problem...
specifically he'll get the path were the page really exists instead of the sym'd path which is what he wants.
From www.php.net/realpath : realpath() expands all symbolic links and resolves references to '/./', '/../' and extra '/' characters in the input path . and return the canonicalized absolute pathname. Sounds like it'll work.
Not even a little bit. The OP needs the directory the symlink lives in, not the one it points to. As your snippet of the manual says realpath expands all symbolic links which means it will give the full path to the directory the symlink points to. Not what's needed. After you've admitted to not reading the question you might find it beneficial to go back and do that before arguing that your suggestion will work. -Stut -- http://stut.net/

« previous php.general (#282302) next »