使用PHP来检测它的htaccess用户签名?它的、用户、PHP、htaccess

2023-09-02 00:44:00 作者:嘟起嘴的萌妞

奥基dokey, 我构建一个上传所以我认识的人可以给我安全的文件,并提供方便。不过,我想设计它只是,当我的一个朋友请使用的及其的签到(其将一个.htaccess登录)。我可以建立在PHP和记录他们的文件与他们的帐户相关联的数据库。

Okey dokey, I'm constructing an upload so people I know can send me files securely, and with ease. But I want to design it just so, that when one of my friends sign in with their sign-in (its going to an .htaccess login). I can establish that in PHP and log their file into a database associated with their account.

总之,我需要的PHP能够检测到是谁在签署这样我就可以将数据传递到数据库。

In short, I need PHP to be able to detect who is signed in so I can pass that data to a database.

有没有这样做的任何可能的方式?

Is there any possible way of doing that?

推荐答案

您应该能够获取用户的名字从 $ _ SERVER ['REMOTE_USER'] 变量后,他们已经成功登录。

You should be able to get the user name the user signed in with from the $_SERVER['REMOTE_USER'] variable after they've successfully signed in.