I have a header.php file, which contains files I want to use on different pages:
<link rel="stylesheet" href="css/nav.css" type="text/css">
<link rel="stylesheet" href="css/main.css" type="text/css">
I have the file inside a folder called resources
which includes all my css files. I want to have the header so that it can directly link to the css files, but when I try to include the header in my webpages, it includes the path where the file that is including it is stored, not the relative path to where the header file is. How can I make it use the relative path for the header file, not the file where it is being included?
I've tried using, from other answers:
include( dirname(__FILE__) . 'css/main.css');
However, this gives me Not allowed to load local resource
and gives the full file destination, but is correct