|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-02 08:28 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 20:00:01 2025 UTC |
Description: ------------ In the key/value pairs from posted data, periods (.) within the key name (ie, "var.name=some+data") are being converted to underscores (_) (ie, "var_name=some+data"). $HTTP_RAW_POST_DATA contains the correct urlencoded data with the periods (.). $_REQUST, $_POST, and $HTTP_POST_DATA, however, all contain keys with the periods (.) replaced as underscores (_). Note: The "Reproduce code:" section requires "always_populate_raw_post_data = On" in php.ini to see the $HTTP_RAW_POST_DATA... You will, however, see the mangled $_POST variable either way. Reproduce code: --------------- <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { header("Content-type: text/plain"); print_r($HTTP_RAW_POST_DATA . "\n"); print_r($_POST); die; } ?> <form method="post"> <input type="text" name="var.name" value="some data" /> <input type="submit" value="submit" /> </form> Expected result: ---------------- var.name=some+data Array ( [var.name] => some data ) Actual result: -------------- var.name=some+data Array ( [var_name] => some data )