我在Windows机器上使用WAMP 3.1和php 5.6。 能否帮我一些好的指南如何在index.php页面上获取用户的Active Directory用户名?例如:
Hello "USER1" from "MYDOMAIN"
这是我到目前为止所尝试的但没有成功:
print $_SERVER['AUTH_USER'];
print $_SERVER['REMOTE_USER'];
print $_SERVER['LOGON_USER'];
print $_SERVER['AUTH_USER'];
print $_SERVER['REDIRECT_LOGON_USER'];
print $_SERVER['REDIRECT_AUTH_USER'];
只认为有效的是用户域:
$_SERVER['REMOTE_ADDR']