Home  >  Article  >  Backend Development  >  php 怎么 获取 用户登陆的 windows 的域账号?

php 怎么 获取 用户登陆的 windows 的域账号?

WBOY
WBOYOriginal
2016-06-06 20:50:161843browse

比如在公司内网环境里,大家都是一个域的前提下。

怎么用PHP代码,可以识别出 用户登陆的 windows 域账号 (开机用户名)

思路是什么? 需要注意些什么? 需要和公司的IT部门配合吗?让其授权吗?

回复内容:

比如在公司内网环境里,大家都是一个域的前提下。

怎么用PHP代码,可以识别出 用户登陆的 windows 域账号 (开机用户名)

思路是什么? 需要注意些什么? 需要和公司的IT部门配合吗?让其授权吗?

在IIS里设置NTLM认证,要求用户必须使用域帐号登录。
phpinfo()输出里应该可以找到一个变量是用户的域帐号。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn