$sql = sprintf("select count(*) as qty from t_user where f_uid='%s' and f_password='%s'",$password,$userAccount); 这句话能挡住SQL注入吗?
回复讨论(解决方案)
不能,SQL注入的关键在于引号,而sprintf()不会去处理引号。
0
0
$sql = sprintf("select count(*) as qty from t_user where f_uid='%s' and f_password='%s'",$password,$userAccount);
不能,SQL注入的关键在于引号,而sprintf()不会去处理引号。
相关文章
PHP增删改查怎么分页显示数据_php分页实现步骤【技巧】
PHP增删改查怎么导入数据到数据库_php数据导入方法【步骤】
PHP结合MySQL动态生成HTML下拉菜单:从数组数据到安全查询的最佳实践
PHP eval() 安全实践:如何防范外部变量注入的命令执行风险
PHP/MySQL多对多关系处理与安全动态表单数据插入指南
本站声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门AI工具
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号