1. <small id='rBGjP'></small><noframes id='rBGjP'>

      <legend id='rBGjP'><style id='rBGjP'><dir id='rBGjP'><q id='rBGjP'></q></dir></style></legend>
    2. <i id='rBGjP'><tr id='rBGjP'><dt id='rBGjP'><q id='rBGjP'><span id='rBGjP'><b id='rBGjP'><form id='rBGjP'><ins id='rBGjP'></ins><ul id='rBGjP'></ul><sub id='rBGjP'></sub></form><legend id='rBGjP'></legend><bdo id='rBGjP'><pre id='rBGjP'><center id='rBGjP'></center></pre></bdo></b><th id='rBGjP'></th></span></q></dt></tr></i><div id='rBGjP'><tfoot id='rBGjP'></tfoot><dl id='rBGjP'><fieldset id='rBGjP'></fieldset></dl></div>
      <tfoot id='rBGjP'></tfoot>

        <bdo id='rBGjP'></bdo><ul id='rBGjP'></ul>

      如何使用 Zend 框架读取控制器上的 application.ini

      How could read application.ini on controller using zend framework(如何使用 Zend 框架读取控制器上的 application.ini)
        <tbody id='ZLVBO'></tbody>

      <small id='ZLVBO'></small><noframes id='ZLVBO'>

    3. <legend id='ZLVBO'><style id='ZLVBO'><dir id='ZLVBO'><q id='ZLVBO'></q></dir></style></legend>

        <bdo id='ZLVBO'></bdo><ul id='ZLVBO'></ul>

        1. <tfoot id='ZLVBO'></tfoot>

          1. <i id='ZLVBO'><tr id='ZLVBO'><dt id='ZLVBO'><q id='ZLVBO'><span id='ZLVBO'><b id='ZLVBO'><form id='ZLVBO'><ins id='ZLVBO'></ins><ul id='ZLVBO'></ul><sub id='ZLVBO'></sub></form><legend id='ZLVBO'></legend><bdo id='ZLVBO'><pre id='ZLVBO'><center id='ZLVBO'></center></pre></bdo></b><th id='ZLVBO'></th></span></q></dt></tr></i><div id='ZLVBO'><tfoot id='ZLVBO'></tfoot><dl id='ZLVBO'><fieldset id='ZLVBO'></fieldset></dl></div>

              • 本文介绍了如何使用 Zend 框架读取控制器上的 application.ini的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我的 application.ini 中有这些行

                I have these lines in my application.ini

                如何在控制器中读取用户

                resources.doctrine.dbal.connections.default.parameters.driver   = "pdo_mysql"
                resources.doctrine.dbal.connections.default.parameters.dbname   = "zc"
                resources.doctrine.dbal.connections.default.parameters.host = "localhost"
                resources.doctrine.dbal.connections.default.parameters.port = 3306
                resources.doctrine.dbal.connections.default.parameters.user = "root"
                resources.doctrine.dbal.connections.default.parameters.password = "123456"
                

                我使用了这段代码,但它返回 null

                I use of this code but it retuens null

                $bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');
                 $user = $bootstrap->getOption('user');
                var_dump($user);
                

                我如何阅读所有连接选项?

                推荐答案

                我认为你应该使用

                $this->getInvokeArgs('bootstrap');
                

                欲了解更多信息 参见手册中的本章.

                如何使用

                $conf = $bootstrap->getOption('resources');
                $dbConf = $conf['doctrine']['dbal']['connections']['default']['parameters'];
                

                这篇关于如何使用 Zend 框架读取控制器上的 application.ini的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Zend_Controller_Router_Exception: quot;xyzquot; is not specified(Zend_Controller_Router_Exception:“xyz;未指定)
                Zend_Db_Table subquery(Zend_Db_Table 子查询)
                pcntl_fork and the MySQL connection is gone(pcntl_fork 和 MySQL 连接消失了)
                Change layout in the controller of Zend Framework 2.0(在 Zend Framework 2.0 的控制器中更改布局)
                Zend Mail Gmail SMTP(Zend 邮件 Gmail SMTP)
                Zend_Form: how to check 2 fields are identical(Zend_Form:如何检查 2 个字段是否相同)
                • <legend id='U7hh3'><style id='U7hh3'><dir id='U7hh3'><q id='U7hh3'></q></dir></style></legend>
                  <tfoot id='U7hh3'></tfoot>

                    <i id='U7hh3'><tr id='U7hh3'><dt id='U7hh3'><q id='U7hh3'><span id='U7hh3'><b id='U7hh3'><form id='U7hh3'><ins id='U7hh3'></ins><ul id='U7hh3'></ul><sub id='U7hh3'></sub></form><legend id='U7hh3'></legend><bdo id='U7hh3'><pre id='U7hh3'><center id='U7hh3'></center></pre></bdo></b><th id='U7hh3'></th></span></q></dt></tr></i><div id='U7hh3'><tfoot id='U7hh3'></tfoot><dl id='U7hh3'><fieldset id='U7hh3'></fieldset></dl></div>
                        <tbody id='U7hh3'></tbody>
                    1. <small id='U7hh3'></small><noframes id='U7hh3'>

                        • <bdo id='U7hh3'></bdo><ul id='U7hh3'></ul>