是否有可能使用PHP获取NT用户名? [英] Is it possible to get the NT username using php?

查看:92
本文介绍了是否有可能使用PHP获取NT用户名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



是否可以使用php获取NT用户名?我创建一个使用apache服务器在内部运行的php页面,但我需要获取访问者的nt用户名。到目前为止,我有这段代码

Hi Guys,

Is it possible to get the NT username using php? Im creating a php page that runs internally using apache server but i need to get the nt username name of the visitor. So far i have this code

<?php
	// get client username
	echo 'My username is: ' . $_SERVER['LOGON_USER'];
?>

但没有显示。谢谢

推荐答案

_SERVER [' LOGON_USER'];
?>
_SERVER['LOGON_USER']; ?>

但没有显示。谢谢


请参考: http://stackoverflow.com/questions/12754437/get-windows-username-of-current-user-using-php [ ^ ]





如果你使用Apache服务器这个链接:在您的apache服务器中登录Windows用户 [ ^ ]可能会有所帮助。

[/ EDIT]
Please, refer this: http://stackoverflow.com/questions/12754437/get-windows-username-of-current-user-using-php[^]


If you use Apache server this link: Getting the logged on windows user in your apache server[^] may be helpful.
[/EDIT]


这篇关于是否有可能使用PHP获取NT用户名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆