我在开发服务器上找到AcmeDemo页面的路径(或者在哪里找到相关的底层PHP文件)时遇到了问题。我在设置我的第一个Symfony项目时包含了AcmeDemoBundle,但到目前为止我还没有找到任何有意义的东西。我设置项目的目录结构是:
/home/<username>/<SymfonyProject>/app/
/bin/
/src/Acme
/AppBundle
/vendor/
/web/bundles/acmedemo (symbolic link)
/framework (symbolic link)
/sensiodistribution (symbolic link)
我一直在尝试http://localhost:8000/acmedemo
的变体以及符号链接的内容,但这些只会导致css
和images
目录,所以我有点如何参加Acme Demo会失败。
答案 0 :(得分:0)
您正在浏览prod环境,在此竞赛中默认禁用acmedemobundle:查看文件:app/AppKernel.php
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}
因此,要浏览acmedemobundle项目,您可以访问:
http://localhost:8000/app_dev.php/demo
或者在prod环境中启用捆绑包(通常不要这样做!)。