php怎么判断字符串是不是二进制字符串

2024-11-05 01:50:33
推荐回答(1个)
回答1:


$a="123456789.exe";

if(strstr($a,"exe"))
{
echo "exe\n";
}
elseif(strstr($a,"123"))
{
echo "一二三\n";
}
else
{
echo "全无";
}

?>