php怎么判断是不是手机号
php怎么判断是不是手机号
肯定要用正则表达式解决了。
$g = "/^1[34578]\d{9}$/"上面是正则表达式,那怎么用PHP来写呢?
$g = "/^1[34578]\d{9}$/"
if(preg_match($g, $mobile)){
echo '是手机号。';
}这样就可以了。
zhangsir版权c3防采集https://mianka.xyz肯定要用正则表达式解决了。
$g = "/^1[34578]\d{9}$/"上面是正则表达式,那怎么用PHP来写呢?
$g = "/^1[34578]\d{9}$/"
if(preg_match($g, $mobile)){
echo '是手机号。';
}这样就可以了。
zhangsir版权c3防采集https://mianka.xyz1.安装开发版composer create-project topthink/think=6.0.x-dev tp2.安装模板扩展composer require topthink/think-view3.安装验证码扩展composer require topthink/think-captcha...
{module catid=$catid order=updatetime page=1 join=1_news_category_data on=id} &nbs...
PHP中,如果要下载的文件名称为中文,则会出现文件标题乱码。此时就需要对标题进行编码,也就是说先进性urlencode,然后再放入header,然后问题就解决了。$filename = urlencode("下载文档"); header (&nbs...
1.找到php.ini2.打开php.ini3.搜索memory_limit4.把memory_limit=值改大就好了...
system();System()函数的主要功能是在系统权限允许的情况是执行系统命令,windows系统和Linux系统都可以执行,Windows系统下可执行可执行文件(.exe、.bat等),也可执行cmd命令,Linux下用途更广,因为Linux系统就是基于命令行的,如基本的ls、cp、rm等s...