//转换正则关健字
function str_regexp($str){
$search = array('/', '.', '*', '?', '+', '^', '$', '-', '(', ')', '[', ']', '{', '}');
$replace = array('\/', '\.', '\*', '\?', '\+', '\^', '\$', '\-', '\(', '\)', '\[', '\]', '\{', '\}');
$str = str_replace($search, $replace, $str);
return $str;
}我是一个个列出来换的..有更好?
function str_regexp($str){
$search = array('/', '.', '*', '?', '+', '^', '$', '-', '(', ')', '[', ']', '{', '}');
$replace = array('\/', '\.', '\*', '\?', '\+', '\^', '\$', '\-', '\(', '\)', '\[', '\]', '\{', '\}');
$str = str_replace($search, $replace, $str);
return $str;
}我是一个个列出来换的..有更好?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货