gpt4 book ai didi

zend-framework - Zend Framework - 从 Controller 读取 Application.ini 值

转载 作者:行者123 更新时间:2023-12-04 16:56:38 25 4
gpt4 key购买 nike

我正在尝试将我的 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com