Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/296.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP HTML表单复选框最大值-POST转换为GET_Php_Html_Forms_Checkbox - Fatal编程技术网

PHP HTML表单复选框最大值-POST转换为GET

PHP HTML表单复选框最大值-POST转换为GET,php,html,forms,checkbox,Php,Html,Forms,Checkbox,HTML表单(POST)适用于带有POST值的复选框参数 [季节性比特数1]=>1073741824 仅选中选项[2..]时的结果: [请求\u方法]=>获取 (完全没有$\u POST*或$\u GET数组内容) 请帮助我查看我缺少的内容w.r.t.复选框整数值限制。无法在Google Chrome中使用以下测试页面复制您描述的内容~似乎100%正常。表单值增加了1,但在任何更改之前使用原始值进行测试-正常工作 <!DOCTYPE html> <html lang='en'

HTML表单(POST)适用于带有POST值的复选框参数 [季节性比特数1]=>1073741824 仅选中选项[2..]时的结果: [请求\u方法]=>获取 (完全没有$\u POST*或$\u GET数组内容)
请帮助我查看我缺少的内容w.r.t.复选框整数值限制。

无法在Google Chrome中使用以下测试页面复制您描述的内容~似乎100%正常。表单值增加了
1
,但在任何更改之前使用原始值进行测试-正常工作

<!DOCTYPE html>
<html lang='en'>
    <head>
        <meta charset='utf-8' />
        <title>POST changes to GET???</title>
    </head>
    <body>
        <?php

            if( $_SERVER['REQUEST_METHOD']=='POST' or !empty( $_REQUEST['SeasonBits1'] ) or!empty( $_REQUEST['SeasonBits2'] )){
                printf( "<pre>%s\n%s</pre>", print_r( $_POST, true ),$_SERVER['REQUEST_METHOD'] );
            }
        ?>
        <form method='POST'>    
            <input type='checkbox' name='SeasonBits1' value='1073741825'   >
            <label for='SeasonBits1'>Option[1,073,741,825]</label>
            <input type='checkbox' name='SeasonBits2' value='2147483649'   >
            <label for='SeasonBits2'>Option[2,147,483,649]</label> 
            <input name='Command' type='submit' id='Command2' value='UPDATE'  />
        </form>
    </body>
</html>

发布更改以获取???
选项[1073741825]
选项[2147483649]

问题现在已经解释清楚了

服务器防火墙中的mod_sec在POST中捕获了大的整数值

“COMODO WAF:查找整数溢出攻击”

再次感谢您的回复,这一切都有助于促成这一发现


(此mod_sec规则现在已被此帐户列入白名单)

抱歉,我无法重现您的问题。你必须对你的帖子进行强制转换或做一些事情。你是如何在
xxx.php中处理它的?它对我来说很好,因为它应该将值作为字符串而不是整数
array(size=3)'seasenbits1'=>string'1073741824'(length=10)'seasenbits2'=>string'2147483648'(length=10)'Command'=>string'UPDATE'(length=6)
尝试在
xxx.php
中查看您的帖子中有什么内容,比如
var\u dump($\u post)谢谢你的帮助。根据您的反馈,我进一步跟踪到.htaccess重新编写URL。复选框脚本位于网站的非WP部分,可通过URL直接访问。htaccess规则不喜欢以648结尾的特定值。您的…649在我的上下文中工作,但648会被重定向,从而丢失方法并显示为GET。再次感谢您帮助解决这一奇怪的依赖顺序。如果问题现在已经解决,请随意接受您自己的答案。
<form method="POST" action="example.com/xxx.php" >    
    <input type="checkbox" name="SeasonBits1"  value='1073741824'   >
    <label for="SeasonBits1">Option[1,073,741,824]</label>

    <input type="checkbox" name="SeasonBits2"  value='2147483648'   >
    <label for="SeasonBits2">Option[2,147,483,648]</label> 

    <input name="Command" type="submit" id="Command2" value="UPDATE"  />
</form>

results when only Option[1..] is checked:
    [REQUEST_METHOD] => POST
    [SeasonBits1] => 1073741824

results when only Option[2..] is checked:
    [REQUEST_METHOD] => GET
    (no $_POST  *OR*  $_GET array contents at all)
<!DOCTYPE html>
<html lang='en'>
    <head>
        <meta charset='utf-8' />
        <title>POST changes to GET???</title>
    </head>
    <body>
        <?php

            if( $_SERVER['REQUEST_METHOD']=='POST' or !empty( $_REQUEST['SeasonBits1'] ) or!empty( $_REQUEST['SeasonBits2'] )){
                printf( "<pre>%s\n%s</pre>", print_r( $_POST, true ),$_SERVER['REQUEST_METHOD'] );
            }
        ?>
        <form method='POST'>    
            <input type='checkbox' name='SeasonBits1' value='1073741825'   >
            <label for='SeasonBits1'>Option[1,073,741,825]</label>
            <input type='checkbox' name='SeasonBits2' value='2147483649'   >
            <label for='SeasonBits2'>Option[2,147,483,649]</label> 
            <input name='Command' type='submit' id='Command2' value='UPDATE'  />
        </form>
    </body>
</html>