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!’);}
复制代码
|