ClassNotFoundException Symfony

Bre*_*ent 6 php symfony

我正在尝试让我的网站上线,但一直都会遇到同样的错误...我已经尝试过无处不在,并且使用每个解决方案都没有运气.

错误

ClassNotFoundException:尝试从/home/dcms/public/html/dcms/apha/app/AppKernel.php第19行中的命名空间"Destination\AppBundle"加载类"DestinationAppBundle".您是否需要从另一个命名空间"使用"它?

AppKernel.php

    public function registerBundles()
{
    $bundles = array(
        new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
        new Symfony\Bundle\SecurityBundle\SecurityBundle(),
        new Symfony\Bundle\TwigBundle\TwigBundle(),
        new Symfony\Bundle\MonologBundle\MonologBundle(),
        new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
        new Symfony\Bundle\AsseticBundle\AsseticBundle(),
        new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
        new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
        new Destination\AppBundle\DestinationAppBundle(),
        new Destination\Auth\HashInterfaceBundle\DestinationHashInterfaceBundle(),
    );
Run Code Online (Sandbox Code Playgroud)

文件结构

src
    Destination
        AppBundle
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

小智 5

第一:检查文件src\Destination\AppBundle\DestinationAppBundle.php是否存在

第二:打开DestinationAppBundle.php并检查命名空间是否是Destination\AppBundle

第三:检查是否该申报类名是相同的文件名(在你的情况:DestinationAppBundle