Getting blank value for $_SERVER['AUTH_USER']

柔情痞子 提交于 2019-12-04 05:00:32

I got it working by disabling Anonymous Authentication in IIS, and enabling Windows Authentication (I thought Windows Authentication was already enabled, but it turns out the role was simply installed.) Now $_SERVER['AUTH_USER'] and $_SERVER['REMOTE_USER'] are populated.

I believe the correct index for the authenticated user is $_SERVER['REMOTE_USER'].

According to the PHP documentation, the correct index seems to be PHP_AUTH_USER.

Try using $_SERVER['PHP_AUTH_USER'].

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!