我有消毒一切GET和POST,但是這一次一定要更具體一點幾的功能,我有一個是生產像如何清除字符串php中的某些字符後的所有內容?
array(
1 => http://site/something/another/?get_something=1
2 => http://site/something/another2/?get_something=1
)
鏈接陣列也有是消毒,得到了功能和職位,但該所以我留下功能會從該數組值清除一切
httpsitesomethinganotherget_something1
能有人幫get_something=
之後匹配的一切,清除或get_something = 1替換它,所以mething像
$clear = preg_match('/^[A-Za-z0-9]+$/', $array[1]);
preg_replace("/get_something=".$clear."/i","",$array[1]);
所以你想刪除或替換'='後面的所有內容嗎? – Sampson 2012-04-28 01:27:45
@Jonahtan Samplson在get_something = – Benn 2012-04-28 01:29:54
之後如何使用parse_url()解析url並清理「query」數組值? – 2012-04-28 01:30:08