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

PHP
PHP中上传大体积文件时需要的设置
用PHP生成PDF文件 with FPDF
在同一窗体中使用PHP来处理多个提交任务
PHP经验交流:php访问access的方法
PHP实用手册:PHP常用正则表达式收集
也用PHP来实现网页静态发布的两种方法
PHP使用zlib扩展实现页面GZIP压缩输出
PHP的语言层面的优化以及代码优化技巧
PHP实例:上传多个图片并校验的代码
用php+odbc+access数据库来操作函数
用PHP来实现页面GZIP的压缩输出教程
PHP进阶技巧:php用流方式制作缩略图
使用php 5时MySQL返回乱码的解决办法
新手如何使用PHP来创建RSS的阅读器
PHP实用:用PHP来实现图片的简单上传
利用php和js来轻松实现页面数据的刷新
在PHP中使用随机数的三个步骤详细代码
PHP进阶技巧:如何避免表单的重复提交
PHP技术进阶 PHP SOCKET 技术研究
PHP技术进阶:php用流方式制作缩略图

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 42 ::
收藏到网摘: 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