我正在尝试将我的 Google Maps API key 存储在我的 application.ini 文件中,并且我希望能够在需要时从我的 Controller 中读取它。如何从我的 Controller 中读取 application.ini 中的值?
谢谢!
最佳答案
This文章可能会帮助你。作者解释了如何从 application.ini 文件中检索 gmail 连接参数。
您可能想尝试:
$bootstrap = $this->getInvokeArg('bootstrap');
$aConfig = $bootstrap->getOptions();
googleMapsKey = $aConfig['your_resource']['your_key'];
关于zend-framework - Zend Framework - 从 Controller 读取 Application.ini 值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2538519/