OK, so I've run into an issue with nested php includes, and I want to know what is a good compromise of best practices and ease-of-use.
Here's my website structure:
root - index.php -/include - header.php - footer.php -/articles -article-1.php -/css -style.css
So here's the issue: Inside index.php I have an
include "include/header.php". Inside header.php I have many relative paths such as
<link href="css/style.css>. And inside article-1.php I also have
So the index file works. But the article-1 file can't see the css file because the relative link is now looking for /articles/css/style.css. I found out about the