php 限制输入文字

    xiaoxiao2022-06-23  21

    $newStr = preg_replace('/[^\x{4e00}-\x{9fa5}]/u', '', $_GET['content']); $countstr = mb_strlen($newStr,"utf-8"); if($countstr>200){ echo '文字不能超过200个字'; }
    转载请注明原文地址: https://ju.6miu.com/read-1123145.html

    最新回复(0)