<meta http-equiv=”Content-Type” content=”text/html;charset=utf-8″>
<?php
function checkSafeask($safeask){
if(preg_match_all(“/^([\x81-\xfe][\x40-\xfe])+$/”,$safeask,$match)){
if(strlen($safeask)>50){
echo”您输入的问题超出了25个汉字,请您重新填写!!!”;
}else{
echo $safeask;
return true;
}
}else{
echo “您输入的问题不全是汉字,请您重新填写!!!”;
}
}
checkSafeask(“汉字”)
?>
···
···