芝麻web文件管理V1.00
编辑当前文件:/home/strato/chroot/opt/RZphp80/includes/test/HTTP_Request2/_network/basicauth.php
* @copyright 2008-2020 Alexey Borzov
* @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License * @link http://pear.php.net/package/HTTP_Request2 */ $user = isset($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : null; $pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null; $wantedUser = isset($_GET['user']) ? $_GET['user'] : null; $wantedPass = isset($_GET['pass']) ? $_GET['pass'] : null; if (!$user || !$pass || $user != $wantedUser || $pass != $wantedPass) { header('WWW-Authenticate: Basic realm="HTTP_Request2 tests"', true, 401); echo "Login required"; } else { echo "Username={$user};Password={$pass}"; } ?>