Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 我们如何访问Magento模块配置?_Php_Magento - Fatal编程技术网

Php 我们如何访问Magento模块配置?

Php 我们如何访问Magento模块配置?,php,magento,Php,Magento,我是Magento新手,我想在我创建的模块的/etc/local.xml中添加一些LDAP压缩,但我就是找不到如何 很确定每个人都知道,我在网上找不到合适的文档如何从config.xml文件获取特定配置的示例: [my_module]/etc/config.xml中的设置 <connexions> <ldap> <host><![CDATA[LDAP_HOST]]></host> <user

我是Magento新手,我想在我创建的模块的/etc/local.xml中添加一些LDAP压缩,但我就是找不到如何


很确定每个人都知道,我在网上找不到合适的文档

如何从config.xml文件获取特定配置的示例:

[my_module]/etc/config.xml中的设置

<connexions>
    <ldap>
        <host><![CDATA[LDAP_HOST]]></host>
        <username><![CDATA[USERNAME]]></username>
        <password><![CDATA[PASSWORD]]></password>
        <baseDn><![CDATA[BASE_DN]]></baseDn>
    </ldap>
</connexions>

您没有将自己的配置节点放在local.xml中,而是将它们放在模块的config.xml中。对不起,我指的是/etc/config.xml,而不是/etc/local.xml。但是谢谢你的文章,它帮助我找到了如何获得设置!
Mage::getConfig()->loadModulesConfiguration( 'config.xml' )
                 ->getNode( 'connexions/ldap')
                 ->asXML()