7月
18
用正则表达式手段匹配尖括号内部
使用php手段删除包括尖括号在内的所有字段
$s = 'asdfs<fadfjhasf>';
echo preg_replace('/<[^>]*>/', '', $s);
echo preg_replace('/<[^>]*>/', '', $s);
使用php手段删除包括尖括号在内的所有字段
<?
$tes = "1212312312312312<scriptasda>";
echo $tes;
echo "-----------<br>";
echo strip_tags($tes);
?>
$tes = "1212312312312312<scriptasda>";
echo $tes;
echo "-----------<br>";
echo strip_tags($tes);
?>





