<?php
if(strpos('www.baidu.com','www') !==false){
echo'include the string';
}else{
echo'does not contain the string';
}
<?php
if(strpos('www.baidu.com','www') !==false){
echo'include the string';
}else{
echo'does not contain the string';
}