How to check the directory for a match with another directory?

    1 answer 1

    Compare their full ways, for example.

    if ( realpath($dir1) == realpath($dir2) ) {} 

    A running script must have startup rights on all directories in the hierarchy being checked, otherwise realpath () will return FALSE.