当前位置:Gxlcms >
数据库问题 >
ECSHOP后台SQL查询提示错误 this sql May contain UPDATE,DELETE,TRUNCATE,ALTER,DROP,FLUSH,INSERT
ECSHOP后台SQL查询提示错误 this sql May contain UPDATE,DELETE,TRUNCATE,ALTER,DROP,FLUSH,INSERT
时间:2021-07-01 10:21:17
帮助过:4人阅读
(!
empty(
$_POST[‘sql‘
]))
{
preg_match_all("/(SELECT)/i",
$_POST[‘sql‘],
$matches);
if(
isset(
$matches[1]) &&
count(
$matches[1])>1
)
{
sys_msg("this sql more than one SELECT "
);
}
if(
preg_match("/(UPDATE|DELETE|TRUNCATE|ALTER|DROP|FLUSH|INSERT|REPLACE|SET|CREATE|CONCAT)/i",
$_POST[‘sql‘
]))
{
sys_msg("this sql May contain UPDATE,DELETE,TRUNCATE,ALTER,DROP,FLUSH,INSERT,REPLACE,SET,CREATE,CONCAT "
);
}
}
ECSHOP后台SQL查询提示错误 this sql May contain UPDATE,DELETE,TRUNCATE,ALTER,DROP,FLUSH,INSERT
标签: