huaixiaoya

huaixiaoya

这家伙有点懒,还没写个性签名!

  • 财富值4745
  • 威望值0
  • 总积分5155

个人信息

  • 回复了 的回答

    请问你在哪个地方打印$_GET的,$_GET真正被处理的时候在这里,假设是基于?r=这样子的

    public function resolve()
    {
            $result = Yii::$app->getUrlManager()->parseRequest($this);
            if ($result !== false) {
                list ($route, $params) = $result;
                if ($this->_queryParams === null) {
                    // 罪恶的代码
                    $_GET = $params + $_GET; // preserve numeric keys
                } else {
                    $this->_queryParams = $params + $this->_queryParams;
                }
                return [$route, $this->getQueryParams()];
            } else {
                throw new NotFoundHttpException(Yii::t('yii', 'Page not found.'));
            }
    }
    

    在sitecontroller 的 actionIndex中

        public function actionIndex()
        {
            print_r($_GET['xp']);
            return $this->render('index');
        }
    
  • 提出了问题
    $_GET['test']会报错
  • 2016-03-15 已签到
    连续签到2天,获得了10个金钱
  • 赞了回答

    console/config/main.php 中添加如下代码:

    'components' => [
        'authManager' => [
            'class' => 'yii\rbac\DbManager',
        ],
    ],
    

    关闭终端,重新打开终端执行 php yii migrate --migrationPath=@yii/rbac/migrations

  • 回复了 的回答

    console/config/main.php 中添加如下代码:

    'components' => [
        'authManager' => [
            'class' => 'yii\rbac\DbManager',
        ],
    ],
    

    关闭终端,重新打开终端执行 php yii migrate --migrationPath=@yii/rbac/migrations

    配置放在console/config/main.php 中就可以
    放在 backend/config/main.php 中为什么就不行呢?
    如果我只想后台运用这个权限,应该怎么配置

  • 2016-03-14 已签到
    连续签到1天,获得了5个金钱
  • 2016-03-10 已签到
    连续签到1天,获得了5个金钱
  • 2016-03-08 已签到
    连续签到2天,获得了10个金钱
  • 2016-03-07 已签到
    连续签到1天,获得了5个金钱
  • 2016-03-04 已签到
    连续签到5天,获得了20个金钱
副总裁 等级规则
5155/10000
资料完整度
50/100
用户活跃度
0/100

Ta的关注

13

Ta的粉丝

12

Ta的访客

30