If your link points to a folder it should ends with a slash (/), but if you use a php variable to define it and you sometimes need to add some page at the end of your link, you could have a problem: the double slash (//).
I.g. you could have this variable php
$mypath="mypath1/mypath2/";
The final slash is recommended to avoid a redirect (that you would have with $mypath="mypath1/mypath2).
And you can call that variable in all your webpages pointing at that folder, in this way:
<a href=”<?php echo $mypath ?>”>some name</a>
But if you have to point to a specific page in that folder, you shouldn’t use this code:
<a href="<?php echo "$mypath/a-specific-page.php" ?>">some other name</a>
otherwise you will get, in the final html, a double slash. No way, course to write $mypatha-specific-page.php , because in this case your would call a not existing variable ($mypatha-specific-page.php ).
A good solution could then be this
<a href="<?php echo $mypath . 'a-specific-page.php' ?>">some other name</a>