spl_autoload_register issue
<p>I don't get why I get this error </p>

<pre><code>Fatal error: Class 'ImageJpg' not found
</code></pre>

<p>Here is the code that I use</p>

<pre><code>spl_autoload_register(function($class) {
    if(file_exists($class))
    {
        include $class.'.php';
    }
});

$n = new ImageJpg();
</code></pre>

<p>File ImageJpg.php is in the same dir with the code above.</p>

<p>Here is the content of ImageJpg.php</p>

<pre><code>&lt;?php
class ImageJpg
{
    public function __construct()
    {
        echo 'Image from jpg called';
    }
}
</code></pre>
