mark php安全问题

原创
2016-07-28 08:28:12 753浏览

在所有php认为是int的地方输入string,都会被强制转换,比如

$a = 'asdfgh'//字符串类型的a
echo$a[2]; //根据php的offset 会输出'd'
echo$a[x]; //根据php的预测,这里应该是int型,那么输入string,就会被intval成为0 也就是输出'a'

如果switch是数字类型的case的判断时,switch会将其中的参数转换为int类型。如下:

$i ="2abc";
switch ($i) {
case0:
case1:
case2:
    echo"i is less than 3 but not negative";
    break;
case3:
    echo"i is 3";
}

松散比较的表格

 mark php安全问题

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('
  • ').text(i)); }; $numbering.fadeIn(1700); }); });

    以上就介绍了 mark php安全问题,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

  • 声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。