Home > Article > Backend Development > There is a problem configuring yii2 rbac and an internal error is reported.
I get an error when configuring rbac of yii2. Configure according to the method provided at this address
http://www.manks.top/yii2_fra...
An error will be reported when configuring the urlManager item in main.php, as long as it is set
<code>"urlManager" => [ // 'class' => 'yii\rbac\DbManager', //这里记得用单引号而不是双引号 ],</code>
An error will be reported here
What exactly is going on?
I get an error when configuring rbac of yii2. Configure according to the method provided at this address
http://www.manks.top/yii2_fra...
An error will be reported when configuring the urlManager item in main.php, as long as it is set
<code>"urlManager" => [ // 'class' => 'yii\rbac\DbManager', //这里记得用单引号而不是双引号 ],</code>
An error will be reported here
What exactly is going on?
//Add the authManager component to the components array, there are two methods: PhpManager and DbManager,
<code>//PhpManager将权限关系保存在文件里,这里使用的是DbManager方式,将权限关系保存在数据库. "authManager" => [ "class" => 'yii\rbac\DbManager', //这里记得用单引号而不是双引号 "defaultRoles" => ["guest"], ], 人家是authManager</code>