In any case, I started testing this out a little more on my box and noticed a few problems on the windows side. Namely, if a filename ends with the .lnk extension (WinXP) then the file is supposed to be a shortcut / link to another file. In this case the realpath can return true, even though opening the file (through the file manager) will actually open up the file it points to.
AFAIK this is because links in PHP are simply not supported for windows - you'll have to do that checking manually.
function is_absolute($path) { if (PHP_OS == 'WINNT' || PHP_OS == 'WIN32') { $pattern = '/^[a-zA-z]:.*[^.lnk]$/'; return preg_match($pattern, $path); } else { return $path{0} == '/'; } }
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php