.htpasswd 主要是 apache 使用的基于文件的用户名和密码的存储
<?php
// - - - - - - - - - - - - - - - - - - -
// Author: Christopher Hair
// Website: www.chrishair.co.uk
// - - - - - - - - - - - - - - - - - - -
if (isset($_POST['submit'])){
$error = '';
$username = trim(stripslashes($_POST['username']));
$password = trim(stripslashes($_POST['password']));
if ($username == '' || preg_match('/\s/m', $username)) {
$error .= "<p><strong>Invalid Username.</strong></p>\n";
}
if ($password == '' || preg_match('/\s/m', $password)) {
$error .= "<p><strong>Invalid Password.</strong></p>\n";
}
if ($error == '') {
echo "<p>Success</p>\n";
echo "<h1>" . htmlspecialchars($username) . ":" . crypt($password) . "</h1>\n";
} else {
echo $error;
}
}
?> 以上就是PHP 生成 .htpasswd 文件的用户名和密码的内容,更多相关内容请关注PHP中文网(www.php.cn)!
如果您是新用户,请直接将本程序的所有文件上传在任一文件夹下,Rewrite 目录下放置了伪静态规则和筛选器,可将规则添加进IIS,即可正常使用,不用进行任何设置;(可修改图片等)默认的管理员用户名、密码和验证码都是:yeesen系统默认关闭,请上传后登陆后台点击“核心管理”里操作如下:进入“配置管理”中的&ld
0
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号