超人名片_老超人

超人名片

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

FacebookTwitter上告诉您的朋友有关此帖子的信息

翻译自: https://www.phpied.com/old-superglobals/

超人名片

相关文章:

  • 2022-03-09
  • 2021-06-22
  • 2022-02-06
  • 2022-12-23
  • 2021-04-28
  • 2021-08-09
  • 2021-04-16
  • 2021-04-18
猜你喜欢
  • 2021-05-09
  • 2021-06-24
  • 2022-12-23
  • 2022-01-23
  • 2022-01-15
  • 2022-12-23
  • 2021-05-22
相关资源
相似解决方案