Access to module config in Zend Framework 2

前端 未结 8 2111
清酒与你
清酒与你 2021-01-30 21:05

How I can get access to my module config from the controller?

8条回答
  •  一生所求
    2021-01-30 21:37

    you can also access any config value anywhere by this hack/tricks

    $configReader = new ConfigReader();
    $configData = $configReader->fromFile('./config.ini');
    $config = new Config($configData, true);
    

提交回复
热议问题