在日誌嗨,我已經警告字符串,同時插入和更新動作無法設置不安全的屬性
2013/02/05 16:43:57 [warning] [application] Failed to set unsafe attribute "logo" of "Model".
規則模型
public function rules()
{
return array(
array('typeId, cityId, new', 'numerical', 'integerOnly'=>true),
array('title, url', 'length', 'max'=>255),
array('content, created, deleted', 'safe'),
array('url', 'url', 'on'=>'insert, update'),
array('typeId, cityId, title', 'required', 'on'=>'insert, update'),
array('logo', 'file', 'types'=>'jpg, jpeg, gif, png', 'maxSize'=>100*1024, 'allowEmpty'=>true, 'tooLarge'=>'{attribute} is too large to be uploaded. Maximum size is 100kB.'),
array('id, typeId, cityId, title, content, new, url, logo', 'safe', 'on'=>'search'),
);
}
我不明白爲什麼我得到這個worning。我有標識字段的規則,自己也
謝謝!!!!!! – dr0zd