【PHP】打开浏览器密码输入对话框
时间:2021-07-01 10:21:17
帮助过:2人阅读
<无详细内容>
- if (($_SERVER['PHP_AUTH_USER'] != 'specialuser') || ($_SERVER['PHP_AUTH_PW'] != 'secretpassword')) {
- header('WWW-Authenticate: Basic Realm="Secret Stash"');
- header('HTTP/1.0 401 Unauthorized');
- print('You must provide the proper credentials!');
- exit;
- }
- ?>
|