据我所知,我完全按照我应该做的规定完成了这项工作,但PCRE对我来说完全没有意义,所以我会问你这个代码有什么问题,为什么会说:
对于中偏移量为10的字符类,缺少终止]
$UrlTeams = preg_replace(
array(
"/[\/\\\40][\\]?/",
"/[\.%]/",
"/\&/"
),
array(
"/\-/",
"",
"\&\;"
),
$UrlTeams
);
答案 0 :(得分:1)
尝试:
$UrlTeams = preg_replace(
array(
"#[/\40\\\\][\\\\]?#",
"#[.%]#",
"#[&]#"
),
array(
"-",
"",
"&"
),
$UrlTeams
);