title: How to properly reference the css files and includes in a php project?
body: <p>I am new to php and understand that this is quite a common problem. I have read a lot of related issues over the net and here at stack overflow however I have not been able to successfully implement them.</p>
  
  <p>I have a project with a directory structure like so:</p>
  
  <pre><code>Project/
       includes/
                header.php
                footer.php
                sidebar.php
       css/
                style.css
       index.php
       blog/
                index.php
  </code></pre>
  
  <p>Within the index.php in the root I pull in the includes like so:</p>
  
  <pre><code>include 'includes/header.php';
  </code></pre>
  
  <p>And the css file in the header.php like so:</p>
  
  <pre><code>&lt;link rel="stylesheet" href="css/style.css"&gt;
  </code></pre>
  
  <p>Now this works on the index.php file in the root and any other file placed within the root. However it breaks for all pages within a sub folder for example the blog/index.php</p>
  
  <p>My main question is how can i properly reference my css files and my includes in a project so that the files are accessible to second level pages as well?</p>
  
  <p>Notes:<br>
  - I am working on a local server<br>
  - All project files are contained within a PROJECT folder in the root - (localhost:8888/Project/index.php)</p>
  
  <p>Any help will be much appreciated. </p>
  
  <p>Thank you.</p>