如何判断一字符串中是否含有中文?

如题~请说详细点~我笨!
---------------------------------------------------------------

http://fason.nease.net/code/form/check/check1.htm
---------------------------------------------------------------

1   
2$str = "中文测试";   
3  
4preg_match_all("/([\x81-\xfe][\x40-\xfe])/", $str, $ch);   
5  
6$patterns = array_unique($ch[0]);   
7  
8print_r($patterns);   
Published At
Categories with Web编程
Tagged with
comments powered by Disqus