我将我的项目本地复制到服务器并运行它给了我这个错误:
FatalErrorException:错误:Class' Acme \ IniciBundle \ IniciBundle'不 见/var/www/gesalight/gesaudit2/app/AppKernel.php第19行
这是我的AppKernel:
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
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 Acme\IniciBundle\IniciBundle(),
new Acme\ClientBundle\AcmeClientBundle(),
new Acme\CatalegBundle\AcmeCatalegBundle(),
new Acme\UsuariBundle\AcmeUsuariBundle(),
new Acme\ProjectesBundle\AcmeProjectesBundle(),
new Acme\AdminBundle\AdminBundle(),
new Acme\ErrorBundle\AcmeErrorBundle(),
new Acme\InventariBundle\AcmeInventariBundle(),
new Ps\PdfBundle\PsPdfBundle(),
new Acme\GisBundle\GisBundle(),
new Acme\TaskFlowBundle\TaskFlowBundle(),
new Knp\Bundle\SnappyBundle\KnpSnappyBundle(),
new Acme\CorreuBundle\CorreuBundle(),
new Acme\SectorsBundle\SectorsBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test', 'prod'))) {
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}
return $bundles;
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
}
}
这是我的IniciBundle类文件(在src / Acme /上):
<?php
namespace Acme\IniciBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class IniciBundle extends Bundle
{
}
错误只出现在服务器上,在我的本地计算机上工作正常,它与目录上的文件完全相同。
有什么建议吗?