How to prevent errors during include if file not exist (without @)
<p>Hi guys could you help me with next.</p>

<p>I have next code</p>

<blockquote>
  <p>index.php</p>
</blockquote>

<pre><code>set_include_path(get_include_path()
            .PATH_SEPARATOR.'application/controllers'
            .PATH_SEPARATOR.'application/models'
            .PATH_SEPARATOR.'application/views');
spl_autoload_register();
$front = new Controller;
$front-&gt;route();
</code></pre>

<blockquote>
  <p>Controller.php</p>
</blockquote>

<pre><code>public function route(){
    if(class_exists($this-&gt;getController())){...}......
</code></pre>

<p>I have one way. Insted of using <code>spl_autoload_register();</code> I can write</p>

<pre><code>function __autoload($classname) {
 @include_once $classname.'.php';
}
</code></pre>

<p>But according php documentation, I want to use spl_autoload_register...
If you need full code, I'll be glad to demonstrate it.</p>

<p>Thank you!</p>
