当前位置: 首页 > 图文教程 > 网络编程 > PHP > 常常说的SQL注入是怎么做的? - PHPchina

PHP
PHP技巧:详解phplib模板使用过程及运行原理
PHP技巧:Smarty+adodb分页示例
PHP技巧:PHP脚本中关于拼写检查函数库
PHP技巧:PHP脚本编程中的文件系统函数库
PHP技巧:PHP中几种删除目录的三种方法
学习PHP技术:txtSQL安装手册中文版
学习PHP:PHP的通用检测函数总结
详细学习PHP中对文件和目录的操作方法
PHP+MYSQL实例:网站在线人数的程序代码
Linux操作系统启动httpd失败的解决方法
初学:在PHP开发中如何使用Session?
PHP初学者遇到的中文乱码解决方案
PHP实例:实现文件上传的程序源码
PHP实例:常用的数值判断函数
PHP实例源代码:PHP实现翻页处理的类
PHP实例:从数组里筛选出重复的数据
PHP实例:用PHP实现windows风格的树型菜单
PHP实例程序:实现给上传图片加水印图案的做法
PHP实例:用PHP编写的网上调查投票系统
PHP实例:一个非常全面获取图象信息的PHP函数

常常说的SQL注入是怎么做的? - PHPchina


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 36 ::
收藏到网摘: n/a

常常看到网上说的sql注入是怎么做的?
  应该怎么防止??【论坛浏览】 

 相关评论
作者: catiger 发布日期: 2006-10-06
it is about playing with SQL statement.

if u r familiar with SQL, u can write things like -- or // to comment out something

since the web forms or urls accept parameters, the paramemter values may be used to construct SQL statement, if there lacks a check on the parameter values like avoiding special characters like --, //, ', "", some vicious SQL code could be injected by creating a SQL admin account and even injecting some SQL dll in order to obtain the web server privileges...

usually if using Java beans, .NET data acceess layers, the problem does not exist since those prohibited characters will be detected and exceptions will be thrown out.

is there a solution for PHP? there may be...depending on which web framework you choose to develop your applicaiton upon.

my 2 cents

[ 本帖最后由 catiger 于 2006-10-6 04:20 PM 编辑 ]
作者: ysoo 发布日期: 2006-10-06
英文不好,是否可以用中文说明?

共有评论数 2/每页显示数 10