title: deny public access to a folder but still accessible from other php files
body: <p>I was wondering what is the best way you would deny public access to a folder, but other files on the server can access it? </p>
  
  <p>For example, my templates and scripts I've paid for</p>
  
  <pre><code> public/template/header.html
   public/template/paidscript.js
  </code></pre>
  
  <p>I don't want anyone to access files inside of template folder, but</p>
  
  <pre><code> public/folder/index.php 
  </code></pre>
  
  <p>and the index.php can have this code inside</p>
  
  <pre><code>&lt;?php include (../tempalte/header.html);
  include (../tempalte/paidscript.js);  ?&gt;
  </code></pre>
  
  <p>and any other files on the server can access it. </p>