Is there a builtin function in PHP to intelligently join path strings? The function, given
/fg/x.php as arguments, should return
abc/de/fg/x.php; the same result should be given using
fg/x.php as arguments for that function.
If not, is there an available class? It could also be valuable for splitting paths or removing parts of them. If you have written something, may you share your code here?
It is ok to always use
/, I am coding for Linux only.
In Python there is
os.path.join, which is great.