简体   繁体   English

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

[英]About local.php configuration and location for ZF2 application

I have to take over a ZF2 PHP application which has not been developed by me initially. 我必须接管最初不是由我开发的ZF2 PHP应用程序。

I have been given a local.php file from the former developer. 前开发人员给了我local.php文件。 It contains some configuration elements. 它包含一些配置元素。

  1. I believe I should put this copy in /config/autoload , correct? 我相信我应该将此副本放在/config/autoload ,对吗?

  2. Do I need to perform an extra step to have it loaded by the application, if yes which? 我是否需要执行一个额外的步骤来由应用程序加载它,如果可以,那是什么?

  1. I believe I should put this copy in /config/autoload, correct? 我相信我应该将此副本放在/ config / autoload中,对吗?

Correct. 正确。

Do I need to perform an extra step to have it loaded by the application, if yes which? 我是否需要执行一个额外的步骤来由应用程序加载它,如果可以,那是什么?

You shouldn't need to do anything. 您不需要做任何事情。 The ZF2 skeleton application (which is usually used as the basis for all ZF2 apps) does this by default. 默认情况下,ZF2框架应用程序(通常用作所有ZF2应用程序的基础)执行此操作。 The relevant code is here: https://github.com/zendframework/ZendSkeletonApplication/blob/master/config/application.config.php#L29 - so you can see if your application has something similar. 相关代码在这里: https : //github.com/zendframework/ZendSkeletonApplication/blob/master/config/application.config.php#L29-这样您就可以查看您的应用程序是否具有类似的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM