php判断一句话中是否包含某个关键词
<?php
$a="123456789.exe";
if(strstr($a,"exe"))
{
echo "exe\n";
}
elseif(strstr($a,"123"))
{
echo "一二三\n";
}
else
{
echo "全无";
}
?>
<?php
$a="123456789.exe";
if(strstr($a,"exe"))
{
echo "exe\n";
}
elseif(strstr($a,"123"))
{
echo "一二三\n";
}
else
{
echo "全无";
}
?>