title: No direct script access when using include
body: <p>I have a PHP powered CMS website.  I'd like to include <code>database.php</code> in a PHP script.  database.php is in the config folder and has the db connections details (pass, db_name etc).</p>
  
  <p>Here is the script:</p>
  
  <pre><code>&lt;?php 
    echo __DIR__ ."&lt;br /&gt;&lt;br /&gt;"; 
    //make sure your assumptions on directories and path are correct for the 
    //include below
  
    include '../application/config/database.php';
  
  ?&gt;
  </code></pre>
  
  <p>Running the script, I get this message:</p>
  
  <blockquote>
    <p>/Applications/XAMPP/xamppfiles/htdocs/tslocal/textbook_scripts</p>
    
    <p>No direct script access.</p>
  </blockquote>
  
  <p>On the first line of <code>database.php</code> is this line:</p>
  
  <pre><code>&lt;?php defined('SYSPATH') or die('No direct script access.');
  </code></pre>
  
  <p>I'm guessing that the CMS has somehow "protected" the config file which is preventing me from including it. What is "No direct script access"? Google gives me lots of examples of people seeking to add this functionality. I wish to remove it. Possible? Likely? How do I tell PHP to let me access database.php?</p>