Jason Barnett wrote:
> Ahhhh, methinks I have a competitor for a FileSystem Manager :) Perhaps I
> misunderstand your problem, but this works fine for me (WinXP) because
> realpath
> [quote]Returns canonicalized absolute pathname[/quote]:
>
> <?php
>
> // we know __FILE__ is an absolute path
> $file = __FILE__;
> echo realpath(__FILE__) == $file ? 'The same path' : 'Not the same path';
>
> ?>
>
> http://www.php.net/realpath
That works because the value in __FILE__ seems to be both canonicalised and
absolute.
For an example which breaks, realpath('/home') on my server returns
'/usr/home', so your example would claim that /home is not absolute. Yet,
it is. :-/
TX
--
'Every sufficiently advanced technology is indistinguishable from magic' -
Arthur C Clarke
'Every sufficiently advanced magic is indistinguishable from technology' -
Tom Graves
Email: Trejkaz Xaoza <[EMAIL PROTECTED]>
Web site: http://xaoza.net/trejkaz/
Jabber ID: [EMAIL PROTECTED]
GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F A62C B8C7 BC8B 037E EA73
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php