Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ウェブサイト上のフォルダをhtaccessとhtpasswdで保護しました。
ユーザーがusername/passを入力して、ユーザー名を取得し、それをphp変数に格納して、html接続フォームを作成する必要がない場合に可能かどうか疑問に思っています。
ありがとう !
試しましたか:
$_SERVER['PHP_AUTH_USER']
PHPには、HTTP認証を文書化するページがあります。
動作しません$_SERVER['PHP_AUTH_USER']か?
http://php.net/manual/en/features.http-auth.php