过滤字符串中键的咚咚就只能用str_replace咯.
举个例子说明下,
<?
php$text = "/t/tThese are a few words :) ... ";
$trimmed = rtrim($text);
// $trimmed = "/t/tThese are a few words :) ..."
$trimmed = rtrim($text, " /t.");
// $trimmed = "/t/tThese are a few words :)"
$clean = rtrim($binary, "/x00../x1F");
// trim the ASCII control characters at the end of $binary
// (from 0 to 31 inclusive)
?>