关于 local.php ZF2 应用程序的配置和位置

About local.php configuration and location for ZF2 application

我必须接手一个最初不是我开发的 ZF2 PHP 应用程序。

我从前开发者那里得到了一份 local.php 文件。它包含一些配置元素。

  1. 我认为我应该将此副本放入 /config/autoload,对吗?

  2. 我是否需要执行额外的步骤才能让应用程序加载它,如果需要,是哪一步?

  1. I believe I should put this copy in /config/autoload, correct?

正确。

Do I need to perform an extra step to have it loaded by the application, if yes which?

您不需要做任何事情。 ZF2 骨架应用程序(通常用作所有 ZF2 应用程序的基础)默认执行此操作。相关代码在这里:https://github.com/zendframework/ZendSkeletonApplication/blob/master/config/application.config.php#L29 - 所以你可以看看你的应用程序是否有类似的东西。