本文整理自网络,侵删。
方法如下:
1、找到\phpcms\libs\functions\global.func.php 打开,然后添加函数
代码如下:
function htmrp($str) {
$str = preg_replace("/<script[^>]*>/i", "", $str);
$str = preg_replace("/<\/script>/i", "", $str);
$str = preg_replace("/<iframe[^>]*>/i", "", $str);
$str = preg_replace("/<\/iframe>/i", "", $str);
$str = preg_replace("/<style[^>]*>/i", "", $str);
$str = preg_replace("/<\/style>/i", "", $str);
$str = preg_replace("/<div[^>]*>/i", "", $str);
$str = preg_replace("/<\/div>/i", "", $str);
return $str;
}
function htmrp($str) {
$str = preg_replace("/<script[^>]*>/i", "", $str);
$str = preg_replace("/<\/script>/i", "", $str);
$str = preg_replace("/<iframe[^>]*>/i", "", $str);
$str = preg_replace("/<\/iframe>/i", "", $str);
$str = preg_replace("/<style[^>]*>/i", "", $str);
$str = preg_replace("/<\/style>/i", "", $str);
$str = preg_replace("/<div[^>]*>/i", "", $str);
$str = preg_replace("/<\/div>/i", "", $str);
return $str;
}
相关阅读 >>
国内一些常用php的cms的nginx服务器的伪静态规则整理
phpcms遭遇会员投稿审核无效的解决方法 font color=red原创font
更多相关阅读请进入《phpcms》频道 >>
相关推荐
评论
管理员已关闭评论功能...
- 欢迎访问木庄网络博客
- 可复制:代码框内的文字。
- 方法:Ctrl+C。