title: PHP Include() whole subdirectory with jQuery navigation bar
body: <p>I have a subdirectory folder called /lefnav</p>
  
  <p>It contains this files:</p>
  
  <pre><code>background.jpg
  demo.html
  heading_bg.jpg
  jquery.js
  navigation.jpg
  sliding_effect.js
  styles.css
  tab_bg.jpg
  Thumbs.db
  Thumbs.db/encryptable
  </code></pre>
  
  <p>It actually contains al the elements of this tutorial:</p>
  
  <p><a href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-a-mootools-homepage-inspired-navigation-effect-using-jquery/" rel="nofollow">http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-a-mootools-homepage-inspired-navigation-effect-using-jquery/</a></p>
  
  <p>I want to include with php the whole folder so that the final result is (like this demo):</p>
  
  <p><a href="http://d2o0t5hpnwv4c1.cloudfront.net/004_Moo/tutorial/demo/demo.html" rel="nofollow">http://d2o0t5hpnwv4c1.cloudfront.net/004_Moo/tutorial/demo/demo.html</a></p>
  
  <p>The best I´ve go so far is, but it is not working at all even if I add .css and .js:</p>
  
  <pre><code>&lt;?php
  foreach (glob("leftnav/*html") as $filename) {
      include($filename);
  }
  ?&gt;
  </code></pre>
  
  <p>I would have thought:</p>
  
  <pre><code>include("leftnav/demo.html");
  </code></pre>
  
  <p>Alone should work because it seams logical that when I include the and .html file it should call fot the .css etc but this is not the case for what I see.</p>
  
  <p>EDIT:</p>
  
  <p>I think I´ve sorted where the problem is:</p>
  
  <p>When I include the .html it does call for the css but it calls for it in the wrong folder, it does not add "/leftnav/" how could I solve this?</p>