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

    <small id='5IRhj'></small><noframes id='5IRhj'>

        • <bdo id='5IRhj'></bdo><ul id='5IRhj'></ul>

        对象配置必须是一个包含“类"的数组.yii2 中的元素与 mongodb

        时间:2023-10-16
          • <bdo id='aP0dR'></bdo><ul id='aP0dR'></ul>

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

            2. <legend id='aP0dR'><style id='aP0dR'><dir id='aP0dR'><q id='aP0dR'></q></dir></style></legend>

                <tbody id='aP0dR'></tbody>

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

                  本文介绍了对象配置必须是一个包含“类"的数组.yii2 中的元素与 mongodb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  Error > 使用 yii2+ mongodb 登录或注册时出现错误.

                  Error > while login or signup using yii2+ mongodb gives an error.

                  MongoDB 与 yii2 的连接完成.请帮我解决这个问题.

                  MongoDB connection with yii2 is done. please help me to solve this problem.

                  main-local.php

                  main-local.php

                  return [
                      'components' => [
                              'mongodb' => [
                              'class' => 'yiimongodbConnection',
                              'dsn' => 'mongodb://sameer:27017/demo',
                          ],
                          'mailer' => [
                              'class' => 'yiiswiftmailerMailer',
                              'viewPath' => '@common/mail',
                               'useFileTransport' => true,
                          ],
                      ],
                  ];
                  

                  main.php

                  return [
                      'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
                      'components' => [
                          'cache' => [
                              'class' => 'yiicachingFileCache',
                          ],
                          'user' => [
                                  'identityClass' => 'commonmodelsUser',
                                  'enableAutoLogin' => false,
                              ],
                      ],
                  ];
                  

                  推荐答案

                  检查你的 vendoryiisoftextension.php在我安装了一个将不正确的配置数组添加到文件 vendoryiisoftextension.php 的软件包后,我遇到了同样的错误

                  Check your vendoryiisoftextension.php I had the same error after I had installed one package which add uncorrect config array to the file vendoryiisoftextension.php

                  'tigrov/yii2-country' =>
                       array (
                          'name' => 'tigrov/yii2-country',
                          'version' => '9999999-dev',
                          'alias' =>
                           array (
                             '@tigrov/country' => $vendorDir . '/tigrov/yii2-country/src',
                           ),
                          'bootstrap' => 'tigrov\country\Bootstrap',
                       ),
                  

                  我已将上一个更改为下一个(只是将引导程序包装在数组中)

                  I've changed the previous one to the next one (just wrapped bootstrap in array)

                  'tigrov/yii2-country' =>
                       array (
                          'name' => 'tigrov/yii2-country',
                          'version' => '9999999-dev',
                          'alias' =>
                           array (
                              '@tigrov/country' => $vendorDir . '/tigrov/yii2-country/src',
                           ),
                           array(
                              'bootstrap' => 'tigrov\country\Bootstrap',
                           )
                       ),
                  

                  这篇关于对象配置必须是一个包含“类"的数组.yii2 中的元素与 mongodb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:带有 POST 数据的 cURL 错误 下一篇:在 yii2 中自定义网格视图

                  相关文章

                  <legend id='PpS1S'><style id='PpS1S'><dir id='PpS1S'><q id='PpS1S'></q></dir></style></legend>

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

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