1、净化HTML内容通过移除恶意代码.
$purifier=new CHtmlPurifier;
CHtml::dropDownList('下拉框的name','2第几项默认被选中','下拉内容','array('empty'=>'-请选择-',html其他元素)')
跳转前一个页面url $this->redirect(Yii::app()->request->urlReferrer);
$purifier=new CHtmlPurifier;
$content=$purifier->purify($content); 详细查询 CHtmlPurifier 下的purify()方法
CHtml::dropDownList('下拉框的name','2第几项默认被选中','下拉内容','array('empty'=>'-请选择-',html其他元素)')
3 yii常用的两个url
当前页面url echo Yii::app()->request->url;跳转前一个页面url $this->redirect(Yii::app()->request->urlReferrer);
本文介绍了如何使用CHtmlPurifier净化HTML内容,避免恶意代码。同时分享了dropDownList的使用方法及yii中常用URL操作,适用于前端开发人员。
160

被折叠的 条评论
为什么被折叠?



