Symfony调用配置
我尝试从config_dev.yml、config_prepod.yml调用配置。。。在条令配置中 例如,我有:Symfony调用配置,symfony,Symfony,我尝试从config_dev.yml、config_prepod.yml调用配置。。。在条令配置中 例如,我有: doctrine: dbal: connexions: test: driver : ... host: 1.1.1.1 port: 1111 ... 在我目前拥有的控制器中: $output = file_get_contents('http://1
doctrine:
dbal:
connexions:
test:
driver : ...
host: 1.1.1.1
port: 1111
...
在我目前拥有的控制器中:
$output = file_get_contents('http://1.1.1.1:1111/...', 0, $var)
我想替换http:。。。通过我的config.dbal.connexions.test,这是可能的?您可以使用
$this->getParameter('doctrine.dbal.connexions.test');
你想达到什么目标?