![超人名片](https://img-blog.csdnimg.cn/img_convert/41ca32811673d6f960f7cecc000beb82.png)
超人名片
Prior to php 4.1. there were no $_POST, $_GET, etc. superglobal arrays, but there were a bunch of other superglobals, like $HTTP_POST_VARS, $HTTP_GET_VARS and so on. The guide mentions this in the forms chapter but there is a typo (repeated several times 🙂 ) so I thought I should mention it.
在PHP 4.1之前。 没有$ _POST,$ _ GET等超全局数组,但是还有很多其他超全局数组,例如$ HTTP_POST_VARS,$ HTTP_GET_VARS等。 指南在表单一章中提到了这一点,但是有一个错字(重复了🙂次),所以我想我应该提一下。
The guide talks about these older vars with an underscore before the name, like $_HTTP_POST_VARS, $_HTTP_GET_VARS and so on which is not true. The correct names are $HTTP_POST_VARS, $HTTP_POST_VARS and so on, without the underscores.
该指南讨论了这些较旧的var,其名称前带有下划线,例如$ _HTTP_POST_VARS,$ _ HTTP_GET_VARS等,但这是不正确的。 正确的名称是$ HTTP_POST_VARS,$ HTTP_POST_VARS等,不带下划线。
BTW, a trick if you want use old code, written prior to 4.1.0. on newer php versions is to use something like: < ?php $_GET = &$HTTP_GET_VARS; $_POST = &$HTTP_POST_VARS; $_SERVER = &$HTTP_SERVER_VARS; ?>
顺便说一句,这是一个技巧,如果您想使用旧代码,请在4.1.0之前编写。 在较新的php版本上,则使用类似以下的内容:<?php $ _GET =&$ HTTP_GET_VARS; $ _POST =&$ HTTP_POST_VARS; $ _SERVER =&$ HTTP_SERVER_VARS; ?>
Tell your friends about this post on Facebook and Twitter
在Facebook和Twitter上告诉您的朋友有关此帖子的信息
翻译自: https://www.phpied.com/old-superglobals/
超人名片