我怎么能使用普通HTTP认证和PHP获得Apache下经过验证的用户名? [英] How can I get the authenticated user name under Apache using plain HTTP authentication and PHP?
本文介绍了我怎么能使用普通HTTP认证和PHP获得Apache下经过验证的用户名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
首先,让我们在安全方面的考虑出路。我使用的一次性Apache下简单的身份验证,仅供内部使用,非互联网相连的局域网上,PHP的Web应用程序。
First, let's get the security considerations out of the way. I'm using simple authentication under Apache for a one-off, internal use only, non-internet connected lan, php web app.
如何获取我在PHP中的HTTP验证的用户名?
How can get I the HTTP authenticated user name in PHP?
推荐答案
我认为你是在此之后
$username = $_SERVER['PHP_AUTH_USER'];
$password = $_SERVER['PHP_AUTH_PW'];
这篇关于我怎么能使用普通HTTP认证和PHP获得Apache下经过验证的用户名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文