]+)>/i", $stripable_tags, $allTags, PREG_PATTERN_ORDER); foreach ($allTags[1] as $tag){ $content = preg_replace('/<\/?'.$tag."[^>]*>/iU","",$content); } return $content; } /** * * 去除script标签 * @param string $content 输入字符串 * @return string */ static public function strip_script($content) { return self::strip_selected_tags($content, "