2
我尝试使用自动加载和命名空间时出现此错误。我所有的命名空间的类是在应用程序/库/未找到php命名空间类错误
16-Dec-2016 04:30:50 Europe/Berlin] PHP Fatal error:
Class 'App\libs\App' not found in /Users/mysite/app/page1.php on line 26
这里是我的代码:
require '../public/vendor/autoload.php';
use App\libs\App;
use App\libs\Auth;
class Controller
{
public $app;
public function __construct()
{
@set_exception_handler([$this, 'exceptionHandler']);
$this->app = new App();
}
}
我想这是因为路径名和类名都是应用程序,这可能是问题.. –