Say I am in foo/bar/index.php
and want foo/index.php
.
I require it by saying require_once '../index.php';
I saw somewhere that it is not good practice to do it like this, better to do prepend a slash making it require_once '/../index.php';
Can you explain me the difference and why one is better then the other?