📄 authen.php
字号:
<?php
$auth_ok = 0;
$user = $_SERVER ['PHP_AUTH_USER'];
$pass = $_SERVER ['PHP_AUTH_PW'];
if (isset($user)&&isset($pass)&&$user === strrev($pass)) {
$auth_ok = 1;
}
if (!$auth_ok) {
header('WWW-Authenticate:Basic realm="Top Secret Files"');
header('HTTP/1.0 401 Unauthorized');
// anything else printed here is only seen if the client hits "Cancel"
}
?>
<!--your password-protected document goes here -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -