How does symfony know which configuration file should be used currently?
阿神
阿神 2017-05-16 16:44:36
0
1
383

I took over a new project based on symfony and found that there are many configuration files under /app/config, config_stage.yml, config_production.yml, etc. The system has been using the information in config_stage.yml to connect to the database. Now I need to switch to config_production. yml, don’t know what needs to be changed? After searching the full text, I can't seem to find which file references config_stage.yml.

阿神
阿神

闭关修行中......

reply all(1)
我想大声告诉你

.../app/AppKernel.php

public function registerContainerConfiguration(LoaderInterface $loader)
{
    $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!