PHP – 确保字符串没有空格
发布时间:2020-05-25 09:33:38 所属栏目:PHP 来源:互联网
导读:如何检查 PHP字符串是否包含任何空格?我想检查是否有空格在那里,然后回显一个错误消息如果为true if(strlen($username) == whitespace ){ echo centerYour username must not contain any whitespace/center; if ( preg_match(/s/,
|
如何检查 PHP字符串是否包含任何空格?我想检查是否有空格在那里,然后回显一个错误消息如果为true if(strlen($username) == whitespace ){
echo "<center>Your username must not contain any whitespace</center>";
if ( preg_match('/s/',$username) ) .... (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
