this_summer
我看代码里面有这个,不知道怎么弄?你知道么
- this_summer 回复了 BoyLee 的回答
从error字面理解,是
'\yii\bootstrap\ActiveForm'
, 被当作string了,是不是这里要输入类名,或者 类的实例try this
'activeform' => \yii\bootstrap\ActiveForm,
这个其实看下 init部分的代码就能很清楚了。
@lygmqkl 按照文档上写的
- this_summer 2017-04-18 已签到连续签到1天,获得了5个金钱
- this_summer 回复了 johnny1991 的回答
吧你这个类common\models\register\LoginUser里面定义的$username,这个属性去掉,自定义的属性和数据库里面的字段重复了
原来是这样,现在好了,谢谢啊
- this_summer 赞了回答
吧你这个类common\models\register\LoginUser里面定义的$username,这个属性去掉,自定义的属性和数据库里面的字段重复了
确定登录了
恩恩,登录了
- this_summer 回复了 johnny1991 的回答
'activeform' => '\yii\bootstrap\ActiveForm',
改为
'activeform' => Yii::createObject([ 'class'=>'\yii\bootstrap\ActiveForm' ]),
试试
这样也不行