首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Yii 2上的错误安装扩展报告

Yii 2上的错误安装扩展报告
EN

Stack Overflow用户
提问于 2016-06-24 03:09:46
回答 1查看 316关注 0票数 0

我通过composer安装了扩展名reportico,并且已经安装了web.php配置文件,但是当我进入Reportico错误时。解决办法是什么?

在这里输入图像描述

纸片web.php

代码语言:javascript
复制
<?php

$params = require(__DIR__ . '/params.php');

$config = [
    'id' => 'basic',
    'basePath' => dirname(__DIR__),
    'bootstrap' => ['log'],
    'components' => [
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            ],
        'request' => [
            // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
            'cookieValidationKey' => 'K1pkkP_iwACp933A03LotJ3AfRsyIb-D',
        ],
        'cache' => [
            'class' => 'yii\caching\FileCache',
        ],
        'user' => [
            'identityClass' => 'app\models\User',
            'enableAutoLogin' => true,
        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
        'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            // send all mails to a file by default. You have to set
            // 'useFileTransport' to false and configure a transport
            // for the mailer to send real emails.
            'useFileTransport' => true,
        ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
        'db' => require(__DIR__ . '/db.php'),
        /*
        'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'rules' => [
            ],
        ],
        */
    ],
    'reportico' => [
            'class' => 'reportico\reportico\Module' ,
            'controllerMap' => [
                            'reportico' => 'reportico\reportico\controllers\ReporticoController',
                            'mode' => 'reportico\reportico\controllers\ModeController',
                            'ajax' => 'reportico\reportico\controllers\AjaxController',
                        ]
            ],
    'params' => $params,
];

if (YII_ENV_DEV) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
    ];

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
    ];
}

return $config;

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-06-24 05:20:37

将reportico移动到components数组:

代码语言:javascript
复制
'components' => [
    //...
    'reportico' => [
        'class' => 'reportico\reportico\Module' ,
        'controllerMap' => [
            'reportico' => 'reportico\reportico\controllers\ReporticoController',
            'mode' => 'reportico\reportico\controllers\ModeController',
            'ajax' => 'reportico\reportico\controllers\AjaxController',
        ]
    ]
]
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38005036

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档