title: Password protect automatically generated .html files
body: <p>I'm using the code in Tom's response <a href="https://stackoverflow.com/questions/286938/what-is-the-best-way-to-password-protect-folder-page-using-php-without-a-db-or-u">here</a>. However I have a script that automatically generates .html files into my public_html folder. These files are then loaded by my .php file, which looks something like this:</p>
  
  <pre><code>&lt;?php
  require('./access.php');
  include('./secret_information.html');
  ?&gt;
  </code></pre>
  
  <p>However the "secret_information.html" file is viewable by anyone without the password. I am running an Apache web server. As I understand, all html code / images to be used on a website need to be in the public_html folder. So how can I hide this information? Do I need to setup my automated scripts to generate .php files rather than .html or is there another solution? </p>