title: PHP autoload looking in current php file
body: <p>In file: <code>deckclass.php</code>  , with DOCROOT set to <code>/var/www/Proj/application/controllers</code></p>
  
  <p><strong>getting error:</strong> Fatal error: Class 'Cardclass' not found in <code>/var/www/Proj/application/controllers/deckclass.php</code> on line 38</p>
  
  <p>Why is it searching current php file and not DOCROOT folder?</p>
  
  <pre><code>function __autoload($class_name) 
  {
    //class directories
    $filename = DOCROOT .strtolower($class_name) . ".php";
    if ( file_exists($filename) )
    {
      require_once ($filename);
    }
    else {
      throw new Exception("Unable to load $class_name.");
    }
  }
  
  $card = new Cardclass();
  </code></pre>