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.

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

报告相同问题?

悬赏问题

  • ¥170 如图所示配置eNSP
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥15 键盘指令混乱情况下的启动盘系统重装