RelPath

RelPath is a PHP library to compute the relative path between two file paths.

The  function is analogous to   found in Python, or   in Node.js.