$str = '中国';
if (preg_match("/^[\x7f-\xff]+$/", $str))
{ //兼容gb2312,utf-8
echo "zhongwen";
}
else
{
echo "yingwen ";
}
作者“技术人生”
http://www.bkjia.com/PHPjc/478636.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/478636.htmlTechArticle$str = 中国; if (preg_match(/^[\x7f-\xff]+$/, $str)) { //兼容gb2312,utf-8 echo zhongwen; } else { echo yingwen ; } 作者技术人生...