title: How to include JS/CSS files into templates of Slim Framework?
body: <p>I am developing a simple web app with Slim framework. I got stuck with a probably simple problem. I want to include static files (CSS and Javascript) into my template.</p>
  
  <p>My project folder structure is as follows:</p>
  
  <pre><code>index.php //&lt;=== where all the routing happens.
  /flot
        layout.css
        jquery.js
        ....
  /templates
        first_template.php
  </code></pre>
  
  <p>My header of first_template.php contains:</p>
  
  <pre><code>&lt;link href="../flot/layout.css" rel="stylesheet" type="text/css"&gt;
  &lt;script language="javascript" type="text/javascript" src="../flot/jquery.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>When I call the projects root url </p>
  
  <pre><code>http://localhost/xampp/ProjectX/ 
  </code></pre>
  
  <p>(I'm using XAMPP) the template shows up, but the css and javascript stuff is not working. The Google Chrome console shows:</p>
  
  <pre><code>GET http://localhost/xampp/ProjectX/flot/layout.css 404 (Not Found)
  GET http://localhost/xampp/ProjectX/flot/jquery.js 404 (Not Found) 
  </code></pre>
  
  <p>Any suggestions? I spent almonst one hour in googling, but the overall documentation of the Slim framework is still literally slim :)</p>