【问题标题】:Apache 2.4 Environment VariablesApache 2.4 环境变量
【发布时间】:2014-03-07 17:09:53
【问题描述】:

Windows 网络上的 Apache 2.4.7。

当我在 Environment --> USERNAME 部分查看 phpinfo.php 时,它会返回我的 windows 用户名。

如何在 PHP 中访问该变量?

【问题讨论】:

    标签: php apache environment-variables


    【解决方案1】:

    使用此方法访问环境变量:$_ENV['USERNAME']

    欲了解更多信息,请参阅http://www.php.net/manual/en/reserved.variables.environment.php

    【讨论】:

      猜你喜欢
      • 2017-03-30
      • 2019-07-15
      • 2017-02-19
      • 2011-02-25
      • 1970-01-01
      • 2014-03-24
      • 2015-05-14
      • 1970-01-01
      • 2011-09-20
      相关资源
      最近更新 更多