记录登录密码保护的目录

编程入门 行业动态 更新时间:2024-10-10 04:22:30
本文介绍了记录登录密码保护的目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个文件夹的根目录为 somesite/folder 我敢与目录密码保护功能,密码保护中的cPanel,我猜使用某种形式的 htacccess 的。因此,它不是保护与在连接到我可以检查对数据库正常登录系统。

I have a folder in the webroot at somesite/folder which I'm password protecting with the directory password protection feature in cpanel which I guess uses some form of htacccess. So it's not protected with a normal login system that's connected to a database that I can check against.

在一个正确的用户名和密码被输入时,用户可以看到该文件夹​​的内容

Once a correct username and password is entered, a user can see the content of the folder

somesite/folder/index.php

我试图找到一个PHP的方式,看看有什么帐户用于登录到该文件夹​​。任何人都可以想办法可以做到这一点?

I'm trying to find a php way to see what account was used to log into the folder. Anyone can think of a way this can be done?

推荐答案

有关基本的,身份验证,你就会有 $ _ SERVER ['PHP_AUTH_USER'] 和 $ _ SERVER ['PHP_AUTH_PW'] 。

For basic, authentication, you'll have $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'].

有关摘要,您可以解析 $ _ SERVER ['PHP_AUTH_DIGEST'] 或只是看看 $ _ SERVER ['PHP_AUTH_USER'] 如果你想要的用户名(密码将不会可用)。

For digest, you can parse $_SERVER['PHP_AUTH_DIGEST'] or just look at $_SERVER['PHP_AUTH_USER'] if you want the username (the password won't be available).

更多推荐

记录登录密码保护的目录

本文发布于:2023-11-01 01:12:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1547817.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:密码保护   目录

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!