I can barely understand your problem and posting just over 7 hours after your first post with "NO ONE KNOWS ?" is not likely to get much help.
However, I believe, maybe wrongly, that from:
"If the var $dir is "/""
all you want is a way of checking if $dir is just "/", in which case what about
if ($dir == "/")
{
//do something
}
else
{
//do something else
}
Dunno if thats what you want.
If not, and your having problems with is_dir and is_file I believe that there are problems with PHP4.2.0+, due to register_globals being off by default.
I think a www.php.net (or similar mirror site) search for superglobals helps fill you in on that.
Or:
http://www.php.net/manual/en/language.variables.predefined.php