与IIS PHP Windows身份验证

问题描述:

我工作的一个Intranet应用是构建在PHP在IIS。我想从浏览器到IIS使用Windows身份验证自动通过用户名来验证广告。反正有做到这一点?

I'm Working on an Intranet application that is build in PHP on IIS. I want to authenticate against an AD by passing the username automatically from the browser to the IIS using windows authentication. Is there anyway to do that?

是的,IIS支持集成的Windows身份验证。进入身份验证选项为您的网站......

Yes, IIS supports integrated Windows authentication. Access the 'Authentication' option for your website...

......,改变Windows身份验证项为Enabled(也许是匿名身份验证为已禁用,如果要强制用户进行身份验证)...

...and change the 'Windows Authentication' item to 'enabled' (and perhaps 'Anonymous Authentication' to 'disabled' if you want to force users to authenticate)...

详细信息可在的Technet 一>

在PHP中的用户名应该填充在 $ _ SERVER 超全局。我觉得作为 AUTH_USER ,但我无法证实,现在。使用的var_dump($ _ SERVER); 找到正确的键

In PHP the username should be populated in the $_SERVER superglobal. I think as AUTH_USER, but I can't confirm that right now. Use var_dump($_SERVER); to find the correct key.