I restricted access to my web server using auth_basic method in Nginx but I would like to be able to programatically get the username of the authenticated user so I can create a log file. Any help would be greatly appreciated.
查看phpinfo()文件后,我发现登录的用户设置为:
$_SERVER['PHP_AUTH_USER']
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.