dourong8495 2018-04-12 16:26
浏览 28
已采纳

打开/关闭PHP使超全局数组元素可用作全局变量

$_SESSION['myvar'] becomes available as $myvar after a session_start() call. $_POST['myvar'] becomes available as $myvar after a form is posted.

I find the above behavior with the PHP installation/configuration on one server, but not on another server. How do I query whether the server is configured as such, and how do I configure the installation to change this behavior? I just can't find anything about this in php.net or elsewhere.

  • 写回答

1条回答 默认 最新

  • duan20081202 2018-04-12 16:30
    关注

    This can be turned on via register_globals in your php.ini file. However this is deprecated as of 5.3. See the docs.

    Warning This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog