我刚刚将我的网站上传到云端。它在本地主机上运行良好。但它在包含 RBAC 的视图中给了我这个错误。我不知道为什么(见代码)。
我尝试将 AuthAssignment 模型的模型权限从 644 更改为 777,看看是否有帮助。它没。
当 YII 尝试在我的控制器中运行“CheckAccess”代码时出现错误。错误显示在下面代码的第 220 行。
有谁知道发生了什么以及我能做些什么来解决它?谢谢!
CException
Property "CDbAuthManager.AuthAssignment" is read only.
/var/www/vhosts/MYDOMAIN/yii/framework/YiiBase.php(220)
208 {
209 unset($args[0]);
210 $class=new ReflectionClass($type);
211 // Note: ReflectionClass::newInstanceArgs() is available for PHP 5.1.3+
212 // $object=$class->newInstanceArgs($args);
213 $object=call_user_func_array(array($class,'newInstance'),$args);
214 }
215 }
216 else
217 $object=new $type;
218
219 foreach($config as $key=>$value)
220 $object->$key=$value;
221
222 return $object;
223 }
224
225 /**
226 * Imports a class or a directory.
227 *
228 * Importing a class is like including the corresponding class file.
229 * The main difference is that importing a class is much lighter because it only
230 * includes the class file when the class is referenced the first time.
231 *
232 * Importing a directory is equivalent to adding a directory into the PHP include path.