*** Rik Wasmus escribió/wrote (Thu, 28 Feb 2008 19:00:09 +0100):
>> $dir1 = "/usr/local/apache2/htdocs/"
>> $dir2 = "/usr/local/apache2/htdocs"
>>
> $is_the_same_dir = realpath($dir1) == realpath($dir2);
Just two remarks:
- In Unix, the file system is case sensible. So (depending on what you need
this for) you may use === instead.
- realpath() returns FALSE when the path does not exist; take it into
account.
--
-+
http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web:
http://bits.demogracia.com
+- Mi web de humor austrohúngaro:
http://www.demogracia.com
--