I have an autoloader which loads all the classes I need
<?php
spl_autoload_register('app_autoload');
function app_autoload($class)
{
require "class/$class.php";
}
?>
But there is a problem, if I create a login folder and I need to use my autoloader inside this folder, the autoloader still do a **require "class/$class.php";**
but the folder has changed and should be **../class/$class.php**
How can I manage my code for it to be available in every folders of my website ?
Thanks