yii框架中rulees函数中的safe是怎样用的呢?
publicfunctionrules(){//NOTE:youshouldonlydefinerulesforthoseattributesthat//willrece...
public function rules() {
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('id,groupid,identity_no,startdate,enddate,create_at,update_at', 'safe'),
array('id,activecode,centerid,examdate,startdate,enddate,create_at,update_at', 'safe', 'on' => 'search'),
);
}
这是什么意思呢? 展开
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
array('id,groupid,identity_no,startdate,enddate,create_at,update_at', 'safe'),
array('id,activecode,centerid,examdate,startdate,enddate,create_at,update_at', 'safe', 'on' => 'search'),
);
}
这是什么意思呢? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询