Correcting teacher:PHPz
Correction status:qualified
Teacher's comments:
spl_autoload_register(function($class){
require $class. '.php';
});
namespace zuoye\controller;
class a
{
public static function index()
{
return __METHOD__;
}
namespace zuoye\controller;
class b
{
public static function index()
{
return __METHOD__;
}
namespace zuoye\controller;
class c
{
public static function index()
{
return __METHOD__;
}
namespace zuoye;
require __DIR__ . '/controller/a.php';
require __DIR__ . '/controller/b.php';
require __DIR__ . '/controller/c.php';
echo controller\a::index().'<br>';
echo controller\b::index().'<br>';
echo controller\c::index().'<br>';