Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's hard to see exactly what is going wrong. By the looks of the error, it appears that the <code>__autoload()</code> function isn't being called. If it was I would expect the <code>require_once</code> statement to fail with an error saying file not found, or something like that.</p> <p>You could try by putting some debugging statements in your <code>__autoload()</code> function to see what's going on, including a <code>var_dump</code> of your <code>$clsName</code> variable.</p> <p>It might be worth noting the following message that appears in the <a href="http://php.net/manual/en/language.oop5.autoload.php" rel="nofollow">PHP manual regarding autoloading</a>:</p> <blockquote> <p><a href="http://www.php.net/manual/en/function.spl-autoload-register.php" rel="nofollow">spl_autoload_register()</a> provides a more flexible alternative for autoloading classes. For this reason, using <a href="http://www.php.net/manual/en/function.autoload.php" rel="nofollow">__autoload()</a> is discouraged and may be deprecated or removed in the future.</p> </blockquote> <p>You should also note, that there is a "standard" for PHP autoloading, called <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md" rel="nofollow">PSR-0</a>. Here is a <a href="http://phpmaster.com/autoloading-and-the-psr-0-standard/" rel="nofollow">link to an article</a> that gives a good explanation of it.</p> <p>In both the <a href="http://phpmaster.com/autoloading-and-the-psr-0-standard/" rel="nofollow">article</a> and the <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md" rel="nofollow">PSR-0 document</a> mentioned above, are example autoloaders that you can use. I would suggest using one of these than trying to implement your own.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload