解决方法:
使用 === 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!’);}
本文详细介绍了如何使用PHP中的stripos和strpos函数来处理SQL语句,并根据不同的操作类型进行执行或条件判断。
4万+

被折叠的 条评论
为什么被折叠?



