問題描述
我正在運行網絡.這里我有一個域控制器 (DC),我剛剛在上面安裝了 IIS6、PHP 和 Mysql.一切正常.:)
I am running a network. Here I have a domain controller (DC) I just installed IIS6 , PHP and Mysql on it. every thing is working fine.:)
現在我想在這個本地網站上調出一個腳本.第一個問題是我想檢測哪個網絡用戶(活動目錄用戶)是用PHP登錄的.我的意思是,當用戶登錄到 Windows 時,不需要其他身份驗證就足夠了.
Now I want to bring up a script on this local website. The first problem is that I want to detect which one of network users (active directory users) are logged in with PHP. I mean it is enough for me when the user is logged in to windows there is no need for another authentication.
我想知道我是否可以只使用一個函數或其他東西...它的輸出是 AD 用戶名和用戶組.
I was wondering if I could just use a function or something... that its output is the AD username and user group.
推薦答案
如果您已將 IIS 設置為對用戶進行身份驗證,其中一個或多個應包含用戶名:
If you've set IIS to authenticate users one or more of these should contain the username:
$_SERVER['LOGON_USER']
$_SERVER['AUTH_USER']
$_SERVER['REDIRECT_LOGON_USER']
$_SERVER['REDIRECT_AUTH_USER']
這篇關于如何使用 PHP/IIS 讀取 Windows 登錄用戶名的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!