How could read application.ini on controller using zend framework

后端 未结 6 554
渐次进展
渐次进展 2021-01-06 23:50

I have these lines in my application.ini

how can I read user in my contrroler

resources.doctrine.dbal.connections.default.parameter         


        
6条回答
  •  误落风尘
    2021-01-07 00:36

    you can set any variable using set method as following on index.php inside the public folder Let

    $config = 'test'; Zend_Registry::set('config', $config);

    once the variable has been set then you can get on any controllers/models by following method

    Zend_Registry::get('config');

    Hop it Helps!!

提交回复
热议问题