0 ){ if ( strlen($result[0]) == 2 ){ $matched = preg_match('/'.$words.'/iu', $string, $result); } if ( $matched && isset($result[0]) && strlen($result[0]) > 0 ) { return true; }else{ return false; } }else{ return false; }}$content = '测试关键字';if ( banwordCheck($content, './banwords.txt') ){ echo "matched! ";}else{ echo "no match! ";}