I am working on a website. There are on every page equal navs. So I outsourced them into one PHP file where I echo the nav.
So the problem is the pathes are different because I have some files in subdirectories.
My file hierarchy looks like:
- index.php
- logic/
-- drawer.php
- account/
-- login.php
I include the drawer.php
in index.php
and login.php
.
But when I'm linking from index
to login
, I have a different path as if linking from login
to index
.