首页
IT
登录
6mi
u
盘
搜
搜 索
IT
php 限制输入文字
php 限制输入文字
xiaoxiao
2022-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
)