我正在使用Symfony 3.4,在localhost上进行了测试,当我推送到heroku时,登录正常主页没问题但是我遇到了一些问题,一些路由为new_client,new_fournisseur说:
Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.
问题得到了解决当我通过每次都像这样修改我的AppKernal时修改我的AppKernal:
if (true || in_array($this->getEnvironment(), ['dev', 'test'], true)) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
我不明白为什么它可以启用这个条件,我该怎么做才能以干净的方式解决这个错误?有人有任何想法吗?