![](/img/trans.png)
[英]How to get the authenticated user name under Apache using plain HTTP authentication and PHP?
[英]How can I get the authenticated user name under Apache using plain HTTP authentication and PHP?
首先,让我们排除安全方面的考虑。 我在 Apache 下使用简单的身份验证作为一次性的、仅供内部使用的、非 Internet 连接的 LAN、PHP Web 应用程序。
如何在 PHP 中获取 HTTP 身份验证的用户名?
我认为你在追求这个
$username = $_SERVER['PHP_AUTH_USER'];
$password = $_SERVER['PHP_AUTH_PW'];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.