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

PHP
PHP XML操作类DOMDocument
php jquery 实现新闻标签分类与无刷新分页
php 来访国内外IP判断代码并实现页面跳转
php 计算两个时间戳相隔的时间的函数(小时)
php 日期时间处理函数小结
PHP strtotime函数详解
PHP 抓取新浪读书频道的小说并生成txt电子书的代码
php 空格,换行,跳格使用说明
c#中的实现php中的preg_replace
PHP 分页原理分析,大家可以看看
php 8小时时间差的解决方法小结
PHP 源代码压缩小工具
php 常用类整理
在PHP中检查PHP文件是否有语法错误的方法
PHP simple_html_dom.php+正则 采集文章代码
PHP array_push 数组函数
php 文章采集正则代码
php 需要掌握的东西 不做浮躁的人
phpMyAdmin链接MySql错误 个人解决方案
PHP 获取目录下的图片并随机显示的代码

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


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