本文介绍了为什么$ _POST中的字符串不能包含点“."?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上标题就是全部.我在页面上有一个隐藏的输入,我想在其中将名称设置为"some.major.uber.setting"

Basicaly the title say's it all. i had an hidden input on my page where i wanted to set the name to "some.major.uber.setting"

例如:<input type="hidden" name="some.major.uber.setting" value="dummy value" />

当我查看$ _POST数据时,它包含"some_major_uber_setting".谁能解释这种行为

and when i looked at the $_POST data it contained "some_major_uber_setting". Can anybody explain this behaviour

推荐答案

这可能与register_global = On时间有关. $ _GET/$ _ POST变量被转换为标准变量($ _GET ['foo']变为$ foo).变量名称不能包含点,因此它们在内部进行了转换.

That is probably a relict from register_global = On times. $_GET/$_POST variables were turned into standard variables ($_GET['foo'] became $foo). Variable names can't contain dots so they were internally converted.

这篇关于为什么$ _POST中的字符串不能包含点“."?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 14:17