title: PHP autoload function does not work - wamp
body: <p>I have strange problem with autoload function. </p>
  
  <p>my structure is like this</p>
  
  <pre><code>Project
   |
   +-- test.php
   |    
   +-- class
   |  |  
   |  +-- class.news.php
  </code></pre>
  
  <p>I have this code:</p>
  
  <pre><code>function __autoload($class_name) {
  
  if(file_exists('class/class.'.strtolower($class_name).'.php')){
  
  require_once('class/class.'.strtolower($class_name).'.php'); 
  
  } else {
  
   throw new Exception("Unable to load $class_name.");
  
  }
     }
  
  try {
  
  $a = new News();
  
   } catch (Exception $e) {
  
   echo $e-&gt;getMessage(), "\n";
  
   }
  </code></pre>
  
  <p>i got </p>
  
  <pre><code>Fatal error: Class 'News' not found
  </code></pre>
  
  <p>file class.news.php</p>
  
  <pre><code>class News{
      function insert($request){
          return "ok";
          }
       }
  </code></pre>
  
  <p>im running this on wamp server on windows 10</p>