title: PHP Class not found even though file exists
body: <p>I've researched this and found other questions (<a href="https://stackoverflow.com/questions/8490667/php-class-not-found-but-its-included">PHP class not found but it&#39;s included</a>) but they don't answer this stupidly simple problem!</p>
  
  <p>Here's the error: <code>Class 'Functions' not found in /public_html/sites/sitename/index.php</code></p>
  
  <p>My folder structure is like this:</p>
  
  <pre><code>public_html/assests/php/functions.php //class
  </code></pre>
  
  <p>I <code>require_once</code> this file from here: <code>public_html/sites/sitename/index.php</code></p>
  
  <p>I've checked the <code>file_exists</code>, of course it does else <code>require_once</code> would fail. What is going on?!</p>
  
  <p>Here's my code (just in case I've missed something really dumb...)</p>
  
  <pre><code>    require_once('../../assets/php/functions.php'); 
  
      if( file_exists('../../assets/php/functions.php') ){
          error_log('Of course it exists!');
      }
      else{
          error_log('Oh dear...');
      }
  
      $fn = new Functions();
  </code></pre>
  
  <p>Contents of functions.php (edited for brevity):</p>
  
  <pre><code>class Functions{    
  
      public function functions(){
          //constructor
      }
  
      //pretty print
      public function pp($str){
          return '&lt;pre class="pre-show prettyprint"&gt;'.htmlentities($str).'&lt;/pre&gt;';
      }
  
  }
  </code></pre>