php determine if a sentence contains a certain keyword

<?php

 

$a="123456789.exe";

 

if(strstr($a,"exe"))

{

    echo "exe\n";

}

elseif(strstr($a,"123"))

{

    echo "One two three\n";

}

else

{

    echo "Nothing";

}

 

?>

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327088164&siteId=291194637