glcui 发表于 2017-4-6 11:42:26

php判断字符串是否存在

解决方法:
使用 ===or !==
if(stripos($sql, "insert") === 0){
$excuteResult = mysql_query($sql);
if($excuteResult){
$sql = $sql2."where id = (select max(id) from subway2)";
}
} else if(stripos($sql, "delete") === 0 || stripos($sql, "update") === 0){

if (strpos($foo, “my”)===0) { echo(‘I find!’);}
页: [1]
查看完整版本: php判断字符串是否存在